Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Nov 05, 2006 07:07 PM|LINK
Thanks for the reply. I was half way through implementing the cookie approach you described above when I recieved your reply.
I thought the cookie apporach would probably be the best as I have read a fair bit of bad press about the session object. Having looked at the code I thought the best place to have my cookie code was
TreeviewAdapter.js ExpandCollapse__AspNetTreeView as this seems to be where things actually get expanded or collapsed. What I basically done was write a cookie that represented the expanded node (if a node is collapsed it would be removed from
the cookie) as I thought this would be the most efficient approach. The cookie is called "ExpandedTreeNodes" and the node text is split by a '|' i.e. ExpandedNode1 Text|Node2|Node3.
The cookie can then be read from the server and expand the nodes that are represented in it. The modified TreeviewAdapter.js can be found below: