ViewState, XML and XSLT

C

CJ de Vos

Hi,
I'm using XML and XSLT to format my HTML. After a postback I recreate all
controls as soon as possible (OnInit and after the LoadViewstate). After the
recreation all events are handled correctly. However, some events make
adjustments to the XML. Because of this changed XML I need to recreate all
controls again using the XSLT. This works. The problem arises with the
viewstate, which I am not able to reload. Is there anything I can do to load
the viewstate of the controls.
I already solved this for the Posted data using the
IPostbackDataEventHandler, but I'm stuck with the viewstate. Please note
that I try to not uyse another __postback call.

I already thought of storing the ViewState property of each control
(recursively), but unfortunately this property is Protected. Otherwise I
could have done something like:
Dim sb as New StateBag()
sb.Add(c.UniqueID, CType(Control.ViewState, IStateManager).SaveViewState())
and
CType(Control.ViewState, IStateManager).LoadViewState(sb.Item(c.UniqueID))

Right now I'm thinking along I could try calling the
LoadPageStateFromPersistenceMedium, but am not sure whether this will work
or not.

Does anybody have a good idea or alternative?

Kind regards,
CJ.
 

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,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top