Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Need advice on separating content from look and feel

Reply
Thread Tools

Need advice on separating content from look and feel

 
 
=?Utf-8?B?Sm9l?=
Guest
Posts: n/a
 
      01-20-2005
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

 
Reply With Quote
 
 
 
 
John Timney \(ASP.NET MVP\)
Guest
Posts: n/a
 
      01-20-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
darrel
Guest
Posts: n/a
 
      01-20-2005
> 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


 
Reply With Quote
 
=?Utf-8?B?Sm9l?=
Guest
Posts: n/a
 
      01-20-2005
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
>
>
>

 
Reply With Quote
 
darrel
Guest
Posts: n/a
 
      01-20-2005
> 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...t+usercontrols

-Darrel


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why when I go to photograph someone they always feel they need to look right at the camera and smile. Scott W Digital Photography 6 04-10-2007 12:30 AM
Separating application logic and content from its presentation =?Utf-8?B?R3JlZw==?= ASP .Net 1 09-09-2005 04:01 PM
Recreate msdn drill down look and feel Mark ASP .Net 2 02-23-2004 09:37 PM
Specifying look and feel for embedded windows user control Marina ASP .Net 3 01-28-2004 05:14 PM
Consistent Look and Feel Nick ASP .Net 5 01-15-2004 07:41 AM



Advertisments