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.
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.