Hi there,
I've been investigating something over the last couple of days and I need some help.
The multiview works well with an update panel as long as there are not any webparts on it, as soon as webparts are on a hidden view things become impossible.
WebPartZones have to be registered by the end of the Init phase of a page. You try and add one after that and the app will throw an application. At the Init stage though, the MultiView does not know what is going to be shown yet, this happens at the Load stage when ViewState etc is restored. So the multiview just instatiates the WebPartZone at the Init stage. This also registers the control with the Atlas ScriptManager.
By the time the page actually renders though, the view has worked out that it does not need to render the other views. But the Atlas script manager still has registered all the controls and when it attempts to parse through the script it's made - it asserts because it cannot find the ids of controls that have not been rendered in the hidden views.
I've tried several ways around this, but it comes back to that any WebPartZone on the page must be Init'ed, and because you cannot unregister a control (or at least flag it to be skipped) from the Script Manager it will always assert if this zone is not present on the page.
If I could get at the _scriptControls collection in ScriptManager to remove the web parts from the view that are not being rendered later on in the process - or had a bunch of "UnRegisterControl" type methods in the ScriptManger I could get this working.
If anyone has a work around I've not thought of to get around this please let me know.
Cheers,
Paul