Q:

TreeView loses style on postback

I have 2 selects and treeview.
TreeView rebuilds when any of selects are changed.
But treeview looses all styling on postback when click treeview node.
I wonder how to keep treeView styles?

A:

You might have forgotten the EnableViewState property
treeview1.EnableViewState = True
See http://msdn.microsoft.com/en-us/library/system.web.ui.control.enableviewstate.aspx

