ViewState, XML and XSLT

Discussion in 'ASP .Net' started by CJ de Vos, Jan 6, 2005.

  1. CJ de Vos

    CJ de Vos Guest

    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.
    CJ de Vos, Jan 6, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stylus Studio
    Replies:
    0
    Views:
    637
    Stylus Studio
    Aug 3, 2004
  2. Replies:
    4
    Views:
    657
  3. jkflens
    Replies:
    2
    Views:
    1,448
    jkflens
    May 30, 2006
  4. CJ de Vos

    ViewState, XML and XSLT

    CJ de Vos, Jan 6, 2005, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    180
    CJ de Vos
    Jan 6, 2005
  5. CJ de Vos

    ViewState, XML and XSLT

    CJ de Vos, Jan 6, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    208
    CJ de Vos
    Jan 6, 2005
Loading...

Share This Page