How to maintain state of a TreeView control

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
 
R

Rick

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
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top