Visual Studio .NET - Treeview article question

Asked By michael gerber on 25-Jul-14 01:13 AM
How is the treeview state preserved across trips to the server i.e. how are the already open nodes kept open?
The  last example in Peter Bloomberg's excellent article has the treeview loading content dynamically when you open a node and any already open nodes stay open. but it's not clear to me how that last bit is achieved. Is the SaveViewState called automatically for a Treeview?

believe the controls all have an EnableViewState - Asked By Peter Bromberg on 19-Jan-03 04:29 PM

property which can either be set programmatically,
or in the Properties area when the control is selected
on a webform design surface.
Have you actually tried this control? I haven't looked at it
in a while, but I'd be real surprised if these properties
aren't available.

EnableViewState is the correct answer - Asked By Chris Falter on 25-Jul-14 01:13 AM

When I was at MS I worked with a customer who brought this problem to us, and EnableViewState solved the problem.  This is very important for performance, too, because the (unsupported) IE Webcontrol Treeview control places a huge load on the server when it is created from scratch.