Need advice on separating content from look and feel

Discussion in 'ASP .Net' started by =?Utf-8?B?Sm9l?=, Jan 20, 2005.

  1. Hi,

    I am thinking about designing a website using HTML/ASP.NET. I am expecting
    that the website will have about 50-100 pages. I am planning on using SSI to
    separate the sections of the pages such as header and footer. I will have
    navigational menus placed on the page horizontally and vertically. I was
    wondering if anyone has any suggestions as how to code menus so that
    adding/deleting a menu item won’t mean changing each and every page of the
    site. Ideally I would like to keep the menus in one file and so that if I
    ever have to change anything, I will make changes to one file. Let me know f
    you know of any articles also.

    Thanks in advance,

    Joe
     
    =?Utf-8?B?Sm9l?=, Jan 20, 2005
    #1
    1. Advertising

  2. Dont use SSI, read up on User Controls instead - and code it one as a menu
    tor ead from an xml file which can be cached using fragment caching.

    Also, you could look up the concept of master pages to control your look and
    feel.

    --
    Regards

    John Timney
    ASP.NET MVP
    Microsoft Regional Director

    "Joe" <> wrote in message
    news:...
    > Hi,
    >
    > I am thinking about designing a website using HTML/ASP.NET. I am

    expecting
    > that the website will have about 50-100 pages. I am planning on using SSI

    to
    > separate the sections of the pages such as header and footer. I will have
    > navigational menus placed on the page horizontally and vertically. I was
    > wondering if anyone has any suggestions as how to code menus so that
    > adding/deleting a menu item won't mean changing each and every page of the
    > site. Ideally I would like to keep the menus in one file and so that if I
    > ever have to change anything, I will make changes to one file. Let me

    know f
    > you know of any articles also.
    >
    > Thanks in advance,
    >
    > Joe
    >
     
    John Timney \(ASP.NET MVP\), Jan 20, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?Sm9l?=

    darrel Guest

    > I was
    > wondering if anyone has any suggestions as how to code menus so that
    > adding/deleting a menu item won't mean changing each and every page of the
    > site.


    This, along with SSIs are usually reserved for static web sites. In your
    case, you're using ASP.net, so you can build all sorts of logic to
    dynamically display the menu on each page.

    For your menu, you'd probably want to make it a usercontrol. Then, you'd
    want to pass the usercontrol some sort of property...probably the page you
    are currently on.

    Then, you'd have the control render out each menu item. For the item that
    matches the page you are on, you'd have it render in a different style.

    This way, if you need to modify your menu, you just need to modify this one
    usercontrol file.

    -Darrel
     
    darrel, Jan 20, 2005
    #3
  4. Being new to asp.net world, all your recomendations seems complex and hard to
    implement. Are there any articles or tutorials that will show me how to do
    it. Or are there any simplemethods such as SSI.

    Joe



    "darrel" wrote:

    > > I was
    > > wondering if anyone has any suggestions as how to code menus so that
    > > adding/deleting a menu item won't mean changing each and every page of the
    > > site.

    >
    > This, along with SSIs are usually reserved for static web sites. In your
    > case, you're using ASP.net, so you can build all sorts of logic to
    > dynamically display the menu on each page.
    >
    > For your menu, you'd probably want to make it a usercontrol. Then, you'd
    > want to pass the usercontrol some sort of property...probably the page you
    > are currently on.
    >
    > Then, you'd have the control render out each menu item. For the item that
    > matches the page you are on, you'd have it render in a different style.
    >
    > This way, if you need to modify your menu, you just need to modify this one
    > usercontrol file.
    >
    > -Darrel
    >
    >
    >
     
    =?Utf-8?B?Sm9l?=, Jan 20, 2005
    #4
  5. =?Utf-8?B?Sm9l?=

    darrel Guest

    > Being new to asp.net world, all your recomendations seems complex and hard
    to
    > implement. Are there any articles or tutorials that will show me how to do
    > it. Or are there any simplemethods such as SSI.


    You really need to understand Usercontrols, as they're a basic building
    block in ASP.net. There are a ton of tutorials on them, though. Google
    returns several:

    http://www.google.com/search?q=using asp.net usercontrols

    -Darrel
     
    darrel, Jan 20, 2005
    #5
    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. Nick

    Consistent Look and Feel

    Nick, Jan 14, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    431
  2. Marina
    Replies:
    3
    Views:
    417
    Marina
    Jan 28, 2004
  3. Mark
    Replies:
    2
    Views:
    391
    Chris Jackson
    Feb 23, 2004
  4. kevinsaucier
    Replies:
    0
    Views:
    1,519
    kevinsaucier
    May 12, 2005
  5. soni29
    Replies:
    2
    Views:
    395
    Roedy Green
    Jul 18, 2003
Loading...

Share This Page