LoadViewState with Dynamic Assemblies

S

Scott Nichols

OK, I'm progressing with my programming...

I have a web form that has a control that is dynamically created based
on the currently selected item in a dropdown list. For example, if you
select option 1 control A is inserted into the web form. If you select
option 2 control B is insesrted.

Through brute force programming I have managed to get these controls
to not only retain their view state, but the controls can
programmatically access the infromation.

Here's the interesting thing...

after I switch to option 2 (control B) the first round trip to the
server does not keep any view state infromation. The infromation is
retained only after the second round trip.

I *think* the problem is that I'm re-adding the control in the
LoadViewState method, and not the init method.

But, the controls are stored in separate assemblies and the correct
assembly is loaded based on infromation retrieved from my customized
viewstate.

Has anyone else had experience with this issue?

Cheers,

Scott
 

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,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top