design question, how to implement controls

D

Davids

trying to stop thinking classic ASP way, I want to ask you a design question
about how to seperate page functions. Let's say I have a blog.aspx page
which has 3 subpages;
1) display all (short version) blog entries for selected month or blog
category
2) display selected blog (long version)
3) display list of blog categories and allow user to select one

the old way was to use Request.Querystring("action") where action would be
allblogs, selectedblog or blogcats. A single .asp page would handle it with
3 switch... case statements. No problem doing that in .Net either but the
problem is that all controls in the .aspx page are rendered even though only
one is being used.

So concerning these controls, should I struggle to somehow disable them
until used or do I really need to have three seperate .aspx pages for these
three different - still similiar - sections?
 
E

Eliyahu Goldin

I would go for 3 pages. It is much easier, even if you need to repeat
similar components 3 times.

Eliyahu
 
D

Davids

well that isn't much in the spirit of .Net of reusing code blocks etc??? Is
there any application code example out there that I can learn from?
 
E

Eliyahu Goldin

If you are taking about code-behind classes. nothing stops you from using
the same classes in 3 places. Page layout and service controls are more
difficult to reuse. In ASP.NET 2.0 there are master pages. In ASP.NET 1.1
you can make custom controls, but I wouldn't bother for just 3 pages. To
make more-or-less non-trivial control is a hassle and you have to learn a
lot of things.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top