Last post Oct 12, 2007 08:41 PM by TWDO
Oct 12, 2007 08:41 PM|TWDO|LINK
I have written a custom class to save the state of the TreeView controls that I am using throughout an application that I am working on at the moment (The application is a complete Windows Server web hosting control panel - for those of you that offer simple
web hosting. Check out www.aspDotNetSoftware.com in the near future for its release). The application is using ASP.NET AJAX as well. When the TreeView posts back to the server, I run through the nodes, saving
which ones are expanded and collapsed. When the user comes back to the page, I am able to show the TreeView exactly the way that he/she had left it. The problem I am having is when a user clicks the + and - to expand/collapse the nodes. Doing so fires client-side
script, which does not save state. I need to do one of two things.
1. I need to have the expand and collapse images AutoPostBack. This is probably the preferred method. I am using ASP.NET AJAX, so there will not be a refresh and it will actually seem as though it is just client-side script. I have looked all over to see if
I could set some property to achieve this and have been unsuccessful doing so.
2. Remove the images so that the user is forced to click the text. This takes away from the look of the TreeView and is not the method that I want to use.
I don't have much experience with the TreeView control, but I am finding that it can be much more useful than I had anticipated. Is there anywhere that I can get any "skins" or css/images that people have already coded? I would like to see what others have
done with the look of this control and see if I could "borrow" a few ideas.
asp.net treeview selectednode postback autopostback control panel web hosting