[thelist] Stylesheet based on URL

Ken Schaefer ken at adOpenStatic.com
Thu Nov 6 04:29:27 CST 2003


Request.ServerVariables("Server_Name") will give you the name of the host
requested (eg company1.mydomain.co.uk).

You could add runat="server" to the <head></head> tags, and then a new
literal control to the Controls collection with the necessary stylesheet
information.

Cheers
Ken

Microsoft MVP - Windows Server (IIS)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Les Lytollis" <leslytollis at dimensions-corporatewear.co.uk>
Subject: [thelist] Stylesheet based on URL



I am trying to figure out a way to "skin" the same site for each client
that logs in. The app is B2B and each client company has their own
"personalised" url eg.

http://company1.mydomain.co.uk
http://company2.mydomain.co.uk

The problem I am having is that each client needs to log in to the site,
but I would like the login page to appear skinned in the clients colours
as well, so I can't pick up the stylesheet based on login, which is how
I've always done it before. Is there a way to pick up the right one
based on url (or the host part url)?

The solution platform is IIS, ASP.NET



More information about the thelist mailing list