Hi there,
I have for my website 2 domains. For both domains I have a different stylesheet. What is the best moment of applying this on the fly. By 'moment' I mean the page's 'PreInit', 'Init', 'PreLoad' or 'Load' event of the page's life cycle.
Printable View
Hi there,
I have for my website 2 domains. For both domains I have a different stylesheet. What is the best moment of applying this on the fly. By 'moment' I mean the page's 'PreInit', 'Init', 'PreLoad' or 'Load' event of the page's life cycle.
All you need to do is link the style sheet in your HTML header.... in your case this would be the best since you have style sheets already designed as sperate files...
<link rel="stylesheet" type="text/css" href="YOUR STYLE SHEET LOCATION and FILENAME HERE" />
or you can dut your styles inline also in the head of the HTML document...
<style>
YOUR CSS HERE
</style>
Although this method is depreciating with the evolution of web applications
Hope this helps
Larry Darrah
MS Architect Evangelist
Sorry for my late reply, I was on a holiday.
But I mean that I need to check from which domain the user is entering the page, and then apply the stylesheet.
For example, when the user is entering the page via 'www.mydomain1.com', I need to use stylesheet 'style1.css', if the user is entering the page via 'www.mydomaim2.com', I need to use 'stylesheet2.css'.
I hope I make myself clear.