Switching View inside MultiView control

  • Thread starter Alexander van Doormalen
  • Start date
A

Alexander van Doormalen

I have a MultiView control with 2 Views in it. In the first View I have
a form which contains sereral input controls and a custom UserControl.
In this custom UserControl I have a button which causes a postback.
When the click event gets handled I am grabbing the MultiView instance
from a parent control (using a recusive method).

When i change the active View on this MultiView control nothing
happens. The second time you click the button a a error message pops up
saying the viewstate is invalid. I think this happens because the
MultiView is done loading and setting a new active view doesn't cause a
'reload'. How can I force a reload of this MultiView control so the new
active View will be visible instead of the current View?

I tried the databind method on the MultiView but that doesn't change
the output. Also using an event based approach doesn't work. Any
thoughts?

Thnx in advance
 
A

Alexander van Doormalen

I'm really stuck with this atm. Does anybody have some
suggestions,remarks etc.
 
A

Alexander van Doormalen

Solved it myself. The problem occured because I used Atlas and a custom
control which hadn't got a a container element with the control id as
attribute. What happened was that Atlas tried to update the control in
another update panel which corrupted the viewstate and didn't show up
the screen.

The container element is default a span element in ASP.net. Since a
span elements around a table isnot valid html I overrided
RenderBeginTag and RenderEndTag and left the methods empty so no span
was generated. Solved this by overriding only the RenderBeginTag and
rendered a div begin tag.
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top