Master pages with diff style sheets

Discussion in 'Microsoft ASP .NET' started by Guest, Oct 5, 2006.

  1. Guest

    Guest 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
     
    Guest, Oct 5, 2006
    #1
    1. Advertisements

  2. 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);

    Neil Steventon wrote:
    > 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
     
    Chris Fulstow, Oct 5, 2006
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Yep that sounds like it will work. Thanks for response.

    Neil

    "Chris Fulstow" wrote:

    > 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);
    >
    > Neil Steventon wrote:
    > > 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

    >
    >
     
    Guest, Oct 5, 2006
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Berrucho
    Replies:
    2
    Views:
    320
    Infant Newbie
    Dec 5, 2003
  2. A Traveler

    Diff CSS styles for diff INPUT TYPE='s?

    A Traveler, Aug 31, 2004, in forum: Microsoft ASP .NET
    Replies:
    6
    Views:
    215
    Steve Fulton
    Aug 31, 2004
  3. Replies:
    1
    Views:
    553
    PeterKellner
    May 16, 2006
  4. JT

    Master Page prevents using style sheets?

    JT, Sep 5, 2006, in forum: Microsoft ASP .NET
    Replies:
    8
    Views:
    187
  5. Kat

    Master Pages, Skins & Style Sheets

    Kat, Apr 4, 2007, in forum: Microsoft ASP .NET
    Replies:
    1
    Views:
    117
Loading...

Share This Page