style sheets

Discussion in 'ASP .Net' started by No One, Sep 29, 2004.

  1. No One

    No One Guest

    I have a style sheet file that I would like all .aspx pages to use by
    default. Is there a way to set this globally? If so, how?

    Thanks.
     
    No One, Sep 29, 2004
    #1
    1. Advertisements

  2. No One

    Karl Guest

    The two ways people would mention the most would be to use either a common
    base page in all your pages, or to use master pages.

    My personal opinion is that for this type of presentation layer stuff, go
    with master pages (which you'll find useful a bunch of other ways as well)

    http://www.metabuilders.com/Tools/MasterPages.aspx

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "No One" <> wrote in message
    news:...
    > I have a style sheet file that I would like all .aspx pages to use by
    > default. Is there a way to set this globally? If so, how?
    >
    > Thanks.
    >
     
    Karl, Sep 29, 2004
    #2
    1. Advertisements

  3. No One

    Rena Guest

    Hi karl,
    I just drop by, and have a question about it. I don't know how to use
    masterpages in VS .Net 2003 to development my page, as it seems not
    supporting.. I had tried b4 but fail to use it, is there anything to
    install or it is only available to new version VS.??

    Thx.
    Rena.

    "Karl" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> ¦b¶l¥ó
    news:OVT$ ¤¤¼¶¼g...
    > The two ways people would mention the most would be to use either a common
    > base page in all your pages, or to use master pages.
    >
    > My personal opinion is that for this type of presentation layer stuff, go
    > with master pages (which you'll find useful a bunch of other ways as well)
    >
    > http://www.metabuilders.com/Tools/MasterPages.aspx
    >
    > Karl
    >
    > --
    > MY ASP.Net tutorials
    > http://www.openmymind.net/
    >
    >
    > "No One" <> wrote in message
    > news:...
    > > I have a style sheet file that I would like all .aspx pages to use by
    > > default. Is there a way to set this globally? If so, how?
    > >
    > > Thanks.
    > >

    >
    >
     
    Rena, Sep 29, 2004
    #3
  4. No One

    Karl Seguin Guest

    Rena,
    They aren't built-into .Net 1.1, but will be in 2.0. For the time being you
    can use (free) 3rd party controls which work really well, the link again is:

    http://www.metabuilders.com/Tools/MasterPages.aspx

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Rena" <> wrote in message
    news:...
    > Hi karl,
    > I just drop by, and have a question about it. I don't know how to use
    > masterpages in VS .Net 2003 to development my page, as it seems not
    > supporting.. I had tried b4 but fail to use it, is there anything to
    > install or it is only available to new version VS.??
    >
    > Thx.
    > Rena.
    >
    > "Karl" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> ¦b¶l¥ó
    > news:OVT$ ¤¤¼¶¼g...
    > > The two ways people would mention the most would be to use either a

    common
    > > base page in all your pages, or to use master pages.
    > >
    > > My personal opinion is that for this type of presentation layer stuff,

    go
    > > with master pages (which you'll find useful a bunch of other ways as

    well)
    > >
    > > http://www.metabuilders.com/Tools/MasterPages.aspx
    > >
    > > Karl
    > >
    > > --
    > > MY ASP.Net tutorials
    > > http://www.openmymind.net/
    > >
    > >
    > > "No One" <> wrote in message
    > > news:...
    > > > I have a style sheet file that I would like all .aspx pages to use by
    > > > default. Is there a way to set this globally? If so, how?
    > > >
    > > > Thanks.
    > > >

    > >
    > >

    >
    >
     
    Karl Seguin, Sep 29, 2004
    #4
  5. No One

    No One Guest

    I am not sure I understand the common base option. If I create a webform with
    C# code behind and set the still sheet in the HTML, how is this enherited to a
    new form?

    Karl wrote:

    > The two ways people would mention the most would be to use either a common
    > base page in all your pages, or to use master pages.
    >
    > My personal opinion is that for this type of presentation layer stuff, go
    > with master pages (which you'll find useful a bunch of other ways as well)
    >
    > http://www.metabuilders.com/Tools/MasterPages.aspx
    >
    > Karl
    >
    > --
    > MY ASP.Net tutorials
    > http://www.openmymind.net/
    >
    > "No One" <> wrote in message
    > news:...
    > > I have a style sheet file that I would like all .aspx pages to use by
    > > default. Is there a way to set this globally? If so, how?
    > >
    > > Thanks.
    > >
     
    No One, Sep 30, 2004
    #5
  6. No One

    Karl Seguin Guest

    You create a class:

    class MyBasePage : System.Web.UI.Page{

    public override Render(HtmlTextWriter writer){
    writer.Write("<link....");
    base.Render(writer)
    }

    }

    and you make your webforms inherit from that instead of directly from Page

    Class WebForm1 : MyBasePage{
    //everything else the same
    }


    the code for the base class isn't 100%...I don't have VS open so
    HtmlTextWriter might be wrong and how to use it might be wrong..but should
    give you enough to go by ...

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "No One" <> wrote in message
    news:...
    > I am not sure I understand the common base option. If I create a webform

    with
    > C# code behind and set the still sheet in the HTML, how is this enherited

    to a
    > new form?
    >
    > Karl wrote:
    >
    > > The two ways people would mention the most would be to use either a

    common
    > > base page in all your pages, or to use master pages.
    > >
    > > My personal opinion is that for this type of presentation layer stuff,

    go
    > > with master pages (which you'll find useful a bunch of other ways as

    well)
    > >
    > > http://www.metabuilders.com/Tools/MasterPages.aspx
    > >
    > > Karl
    > >
    > > --
    > > MY ASP.Net tutorials
    > > http://www.openmymind.net/
    > >
    > > "No One" <> wrote in message
    > > news:...
    > > > I have a style sheet file that I would like all .aspx pages to use by
    > > > default. Is there a way to set this globally? If so, how?
    > > >
    > > > Thanks.
    > > >

    >
     
    Karl Seguin, Sep 30, 2004
    #6
    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. Kevin Spencer

    Re: Using external style sheets

    Kevin Spencer, Jul 9, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    392
    Kevin Spencer
    Jul 9, 2003
  2. PJ

    CSS Style Sheets

    PJ, Aug 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    417
    Vincent V
    Aug 22, 2003
  3. Replies:
    1
    Views:
    841
    Bertilo Wennergren
    Nov 24, 2003
  4. Carl Corcoran
    Replies:
    1
    Views:
    327
    Bob Barrows
    Nov 12, 2003
  5. Jake Barnes
    Replies:
    6
    Views:
    244
    Lawrence Krubner
    Apr 12, 2009
Loading...

Share This Page