Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using host header to select CSS?

Status
Not open for further replies.

goaliegirl

IS-IT--Management
May 19, 2005
1
CA
Hi all,

I know enough about ASP.NET to be dangerous, which isn't saying much. :)

I have multiple host headers on one web site in IIS. Let's call them foo.domain.com and bar.domain.com. I would like to load a specific CSS file based on the header the visitor is using to come to the site.

This is what I'm trying to achieve, and I think it should be relatively simple:

User comes to website via foo.domain.com and foo.css is loaded.
User comes to website via bar.domain.com and bar.css is loaded.

I will be adding more host headers and a CSS file for each.

I know this is possible, but I need a shove in the right direction...any ideas?

Thanks,
Angela
 
use a master page have your webforms inherit the masterpage.
within the masterpage
use Page.Request.Url object to find the url the user came from.
depending on the url load a given file.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top