Dynamically changing controls... a bad idea?

M

margaret_alice

Hello,

I have a general design question about asp.net. Consider a webform
which is to switch between a view mode and an edit mode. I convenient
design pattern, in my opinion, is to have different controls for both
the view and edit modes. Thus, by default LoadControl is used to load
the VIEW control and when some button is clicked, the EDIT control will
be loaded.

My first question is: "If the button click is recognized only after the
INIT and LOAD, how can one decide which control to load (without
refreshing the page or using something in the query string)?"

If the answer is to simply put all the controls on the page and make
the current once visible and the others not visible, then another
question is "Isn't this terribly inefficient?"

Thanks so much for your thoughts,
Margy
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top