website design\layout

vthokienj

Newcomer
Joined
Dec 30, 2003
Messages
12
i am creating a site using c#/asp.net and would like to know what the best way to design my site would be.

what i want is for each page to have the same menu bar on top of it, with your standard clickable buttons like Home, Contact Us and whatever else. each link would link to its own page.

currently, i have one page "default.aspx" and i load a custom control menu to the top of this page. a large area of the default area is a placeholder which i load the content into.

so the end result is that default.aspx is always the web page that is loaded and the placeholder is what changes. this way i can have my menu loaded as a control.

However, now that i am getting into Forms authentication and such i see that it will take some trickery to implement this the way i have the site now. Since default.aspx is always the loaded page so it would be difficult to restrict access to other .ascx files i make. At least from what i understand about authentication sofar it would be.

So the question is, is my method of having one page always load and the content loaded into a placeholder the way to go, or is there a better way to have a site design that would be able to use a menu on each page without having to put code in on each page to use that menu?
 
Hopefully some others answer you with this.

I'm getting to like the placeholder for controls. Nice to have one control that does all the work and can be used on multiple pages. Hard part for me was with refresh in the browser and using the Page.IsPostBack to check if the control was refreshed.

If you want your webpages to look alike in design. You can create them (may choose FrontPage or something) copy the code from html, and paste it into each aspx file

That's how I did mine. about 90% done now with the site! :-)

hope that gives you some info!
 
Firstly, I used that approach of creating everything in PlaceHolders on a single ASPX page (couple of years ago), I have since grow to dislike that method.

There are a couple of methods I can recommend....

1) User controls: Add the menu items and other controls that will be repeated on multiple pages into a user control. With this method you only need to include the user control on the pages that require it.

2) Templates: This is my prefered method, you can download a sample project here... http://www.xtremedotnettalk.com/showthread.php?threadid=78721
 
Back
Top