how to compartmentalize asp .net markup

M

mattdaddym

Hi all,

I have an asp .net 2.0 form that will kick off an email on submit. I
started with a super long form and then moved to a series of steps
(like a wizard) to make the user interface less cluttered. I'm happy
with the front end, but not my markup code. I have many, many steps for
the form and it is very hard to find anything now when I go to update
the code. I have comments and neat code, but it is just too many
lines....lol.

Anyway, I was thinking that there should be a way I could
compartmentalize each step in a separate file so I can do my edits by
step instead of mucking through this beast of a file.

Are <includes> still used in .net 2.0?

I could make my page a master page with a content section for each
step? Will this mess with how I refer to my controls. I need access to
all steps no matter what step the user is on.

Could I make my own control out of each step?

I know .net 2.0 has a built in wizard feature but it still dumps all
the code on one page which defeats my purpose.

I'm curious how any of you have dealt with this problem. Thanks in
advance!
 
C

Cowboy \(Gregory A. Beamer\)

Own control for each step? Sure, if it makes sense. It is a good OO model.

Move code to libraries and only use the page code to bind? Also a decent
model.

Combination of the above two? Best of both worlds, if you take enough design
time to do it right.

I am not extremely fond of the wizards, personally, as they hide (sorry,
encapsulate ;->) too much of the information (take that back, it IS hide!).
And, if you step outside of the box, you get bit.
 
M

mattdaddym

Thanks for the reply.

The hidden(ahem, encapsulated) steps are just to keep the form from
appearing like a monster. Also, the steps are dynamic depending upon
the user identity and answers to certain questions.

So there is not a simpler way to separate my markup like can be done
with INCLUDE statements? Thanks again.
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top