Examples of building web site navigation for ASP.NET site?

Discussion in 'ASP .Net' started by Jason Hanks, Jun 10, 2004.

  1. Jason Hanks

    Jason Hanks Guest

    Hi, are there any examples that demonstrate how to build an ASP.NET page
    with consistent parts of the layout, such as page headers, footers, and
    navigation links (such as going into each section like Products, Company,
    Services, etc)?

    I know there are controls that you can use to build menus like ASP.NET menu.
    But I'm talking more about the graphical elements and layout that needs to
    be part of each page.

    For example when I designed my site in old ASP I had include files. So I
    did something like this from each page:

    <!-- #INCLUDE VIRTUAL="/top-of-page.inc"-->
    main page content goes here
    <!-- #INCLUDE VIRTUAL="/bottom-of-page.inc"-->

    But in ASP.NET that doesn't seem like a concept that works. Instead it
    seems like maybe I have a common class or something that will write out my
    headers and footers so I have a consistent look and feel, and so I can just
    change nav links in one place as I make changes to the site instead of
    having to change it on every page like I would if I had embedded it. Any
    examples of how to handle this the "correct" or ideal way in ASP.NET would
    be MUCH APPRECIATED. Thank you.
     
    Jason Hanks, Jun 10, 2004
    #1
    1. Advertising

  2. Jason Hanks

    pmb Guest

    You can implement a so-called "User Control". It works approximately
    like this:

    <%@ Register TagPrefix="myctl" TagName="Footer" Src="footer.ascx" %>
    .... Later on: ...
    <myctl:Footer id="footer1" runat="server" />

    Use the keyword "User Control" to find it in the documentation pages.

    Good luck!

    On Thu, 10 Jun 2004 18:17:22 -0400, "Jason Hanks" <>
    wrote:

    >Hi, are there any examples that demonstrate how to build an ASP.NET page
    >with consistent parts of the layout, such as page headers, footers, and
    >navigation links (such as going into each section like Products, Company,
    >Services, etc)?
    >
    >I know there are controls that you can use to build menus like ASP.NET menu.
    >But I'm talking more about the graphical elements and layout that needs to
    >be part of each page.
    >
    >For example when I designed my site in old ASP I had include files. So I
    >did something like this from each page:
    >
    ><!-- #INCLUDE VIRTUAL="/top-of-page.inc"-->
    >main page content goes here
    ><!-- #INCLUDE VIRTUAL="/bottom-of-page.inc"-->
    >
    >But in ASP.NET that doesn't seem like a concept that works. Instead it
    >seems like maybe I have a common class or something that will write out my
    >headers and footers so I have a consistent look and feel, and so I can just
    >change nav links in one place as I make changes to the site instead of
    >having to change it on every page like I would if I had embedded it. Any
    >examples of how to handle this the "correct" or ideal way in ASP.NET would
    >be MUCH APPRECIATED. Thank you.
    >
     
    pmb, Jun 11, 2004
    #2
    1. Advertising

  3. Jason Hanks

    Jason Hanks Guest

    Are there any samples like in the VB.NET resource kit or somewhere else
    somecan can point me to where I can get a good look at how the site
    navigation html source can be centralized in one location/class/file?


    "pmb" <> wrote in message
    news:...
    > You can implement a so-called "User Control". It works approximately
    > like this:
    >
    > <%@ Register TagPrefix="myctl" TagName="Footer" Src="footer.ascx" %>
    > ... Later on: ...
    > <myctl:Footer id="footer1" runat="server" />
    >
    > Use the keyword "User Control" to find it in the documentation pages.
    >
    > Good luck!
    >
    > On Thu, 10 Jun 2004 18:17:22 -0400, "Jason Hanks" <>
    > wrote:
    >
    > >Hi, are there any examples that demonstrate how to build an ASP.NET page
    > >with consistent parts of the layout, such as page headers, footers, and
    > >navigation links (such as going into each section like Products, Company,
    > >Services, etc)?
    > >
    > >I know there are controls that you can use to build menus like ASP.NET

    menu.
    > >But I'm talking more about the graphical elements and layout that needs

    to
    > >be part of each page.
    > >
    > >For example when I designed my site in old ASP I had include files. So I
    > >did something like this from each page:
    > >
    > ><!-- #INCLUDE VIRTUAL="/top-of-page.inc"-->
    > >main page content goes here
    > ><!-- #INCLUDE VIRTUAL="/bottom-of-page.inc"-->
    > >
    > >But in ASP.NET that doesn't seem like a concept that works. Instead it
    > >seems like maybe I have a common class or something that will write out

    my
    > >headers and footers so I have a consistent look and feel, and so I can

    just
    > >change nav links in one place as I make changes to the site instead of
    > >having to change it on every page like I would if I had embedded it. Any
    > >examples of how to handle this the "correct" or ideal way in ASP.NET

    would
    > >be MUCH APPRECIATED. Thank you.
    > >

    >
     
    Jason Hanks, Jun 22, 2004
    #3
    1. Advertising

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. Laurahn
    Replies:
    3
    Views:
    908
    Steven Cheng[MSFT]
    Feb 6, 2007
  2. mark4asp
    Replies:
    1
    Views:
    1,154
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Mar 24, 2007
  3. Midex
    Replies:
    24
    Views:
    920
  4. Dmitry Klymenko
    Replies:
    2
    Views:
    129
    Richard Creer
    Jan 8, 2007
  5. Stuart Hungerford
    Replies:
    0
    Views:
    106
    Stuart Hungerford
    Mar 14, 2006
Loading...

Share This Page