architecture questions re frames, popups and user controls

W

Wee Bubba

i started by designing my web page using frames. i had my data entry
form in an upper form and my data rows displaying in a lower frame. i
soon discovered that ASP.NET is not really meant for frames so I
changed this to a single page with both the entry form and the
display rows on it which posts back to itself(an improvement i hope?)


ok my single page also needs to have the ability to search for stuff
as you enter data. I know I can achieve this by implementing buttons
which load popup windows which can post data back to the parent form
using javascript. but is this good practice? or should I be thinking
in terms of user controls.

i.e. if a user clicks a search button should I load a popup window or
should i posting back the page instead? i could post back the page
with a mode value of "edit" which would allow me to dynamically
replace the contents of a placeholder from the 'enter data' user
control to the 'search' user control. hence the user would be on the
same page but with a completely different UI.

i am thinking this would be adhering more to the ASP.NET model but
then I am also thinking that if I do this I would have to store all
my data entry form textfield values in session objects before loading
in the 'search' user control as my form variables would be lost
otherwise. this seems like hassle so in this respect a popup window
seems better.

so should I use popups or should I be thinking about using dynamic
user controls and using post backs instead?

If anyone could give me some advice I would be very grateful as this
argument is crucial to my project's architecture. many thanks.
 
S

Steve C. Orr [MVP, MCSD]

Ditching the frames was a good idea.

Your popup dilemma is more a matter of opinion. I'm not sure you could make
a bad decision here. The only downside of popups is all the popup blockers
that are out there these days. This might give you some tech support
headaches.
The postback idea doesn't seem so bad. It seems like you may be able to
work it so that your controls maintain their own viewstate so you don't have
to manage that. (Perhaps by putting them in a frame that you can make
invisible temporarily.) But even if you did have to manage that, it doesn't
sound like a major chore from the description you've given.
 
W

Wee Bubba

thanks steve. what you have said makes sense to me. as this strategy
is going to be the basis for my software architecture, I would just
like to ask a few more questions if that is ok please.

1) I will be keeping all my user controls on the page manipulating
their visible properties depending upon whether user is performing a
search or viewing data etc. Does that sound sensible?

2) As I will be keeping all of my user controls on the same page I
will not have to worry about passing variables from one user control
to another as I will be able to get this information from their
viewstates?

3) I will be able to communicate between different user controls on
the page using event handlers and delegates?

also if you've got any more advice for me I would be very grateful.
thanks for your time.

martin UK
 

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,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top