Save checkbox state

2 posts, 0 answers
  1. Fit2Page
    Fit2Page avatar
    468 posts
    Member since:
    Feb 2007

    Posted 05 Feb 2011 Link to this post


    For an application I have to save the treeview checked items state. When users navigate away from the page and they come back the state of the selection must be persisted. I try to do this to save the collection of the checked items in a cookie or a Session.Item

    The Session.Item is set every time on the OnNodeCheck event.
    When I come back I set the checked nodes from the Session.Item but i think every time I set a checkbox the OnNodeCheck event is fired. Is that correct? What would be the best approach to keep the Checked state in memory so I can reproduce the treeview correctly?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Feb 2011 Link to this post

    Hi Marc,

    Checkout the code library which might help in persisting the checkbox state after postback.
    Persist Checked State after PostBack

Back to Top