Click here to Skip to main content
15,849,829 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using a simple treeview for menu.
The treeview is on a masterpage, right beside it it has the container.
The user uses the treeview to navigate to otherpages using this masterpage.
But on each page load the treeview nodes are collapsed to original state.

How to maintain state of a Expand/Collapse

Its quite a common problem for all of us.
Have a look to the link, it will lead you in right direction

Click here
Share this answer
prateekfgiet 15-Dec-10 5:33am    
Thanks Brij its working fine.
Brij 15-Dec-10 5:35am    
Good.if your issue is resoled then accept it as answer.
prateekfgiet 15-Dec-10 5:56am    
i have accepted answer,and its resolved my issue.
Thanks again
Since you have place your pages in the MasterPage, each page would get its own TreeView at run-time. So, you cannot maintain the state.

Solution 1:
Use IFrame and load the other pages into it.

Solution 2:
Pass the Selection as QueryString and write code to maintain the state.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900