Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best practice for page design 1

Status
Not open for further replies.
Jan 26, 2001
550
GB
Hi Chaps

I've recently made the transition over to .net from classic ASP, and I'm in the process of rewriting an existing site. I have a fairly complex user admin section where users may add events to a database, edit and delete them etc.
In classic asp I would probably have encased all the functionality for this section into one page, with a select command switching between the 'edit' page or new page, or handling the database updates etc.
I was just after some advice on the best way to approach this kind of thing from a .net perspective. Am I best to replicate this behavior in one page, using subs for each part of functionality, and showing/hiding various bits of the page depending on function - or would it be wiser to break this down in one page for 'add new event', one for 'edit event' etc.
Although I guess either approach would work I'm more worried about the efficiency of the pages, for example the overheads of having lots of controls which are there, but not 'visible'. Could anyone offer any advice?

Many thanks
Nick

Nick (Webmaster)

 
i would break out each action into a seperate page. this will be easier to maintain over the life of the application.
I would setup the directory like this
[tt]
Admin/
/Default.aspx [list of events]
/Edit.aspx [update existing event]
/Delete.aspx [readonly and confirm delete]
/Add.aspx [insert new events]
[/tt]
using the web.config I would secure the Admin directory. depending on how much information an admin needs before deleting you could also place a js confirm delete button in each row of on the default.aspx page. (this is usually what i do.)

if you wanted to stay the route of 1 page does all. then use a multiview and put each action on a different view. Views are mutually exclusive so they have not knowledge of each other.
I would then build WebUserControls (ascx) for each action and place an instance of each control on the appropiate view. however i think this is a hack and seperate pages would be the best way to go.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top