How to maintain state of a TreeView control

  • Thread starter Thread starter keithb
  • Start date Start date
K

keithb

I have a TreeView control with EnableViewState = True; however, the TreeView
does not maintain its previous state on postback. Is there something else
that needs to be set up?

Thanks,

Keith
 
Are you repopulating or rebinding (however you handle it) on every
post? I.e. in the form load event, ?

if so, make sure to check for IsPostBack (in form load) and only bind
the Tv when IsPostBack=false.

-Rick
 
Back
Top