Master pages with diff style sheets

G

Guest

Hi ,

I puzzled on how to layout my website. I have a master page with a style
sheet defined in the top. Then I have the various pages using this master
page, I would however for cetain pages either add or use a different style
sheet , whats the best wayto achive this.

Thanks

Neil
 
C

Chris Fulstow

Maybe try something like this:

HtmlLink myHtmlLink = new HtmlLink();
myHtmlLink.Href = "~/StyleSheet.css";
myHtmlLink.Attributes.Add("rel", "stylesheet");
myHtmlLink.Attributes.Add("type", "text/css");
Page.Header.Controls.Add(myHtmlLink);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top