Prevent treeview control from reinitialising on master page for page redirects

Prevent treeview control from reinitialising on master page for page redirects

Post by damiensawy » Tue, 14 Feb 2006 17:52:03


Hello all,

I'm wondering if someone can help me with an issue.

I have a master page that has a treeview control on it (inside an ascx
file).

Also on the master page I have a content placeholder which contains the
various pages of my application. I wish to have the treeview control
displayed at all times during the application.

ASP.Net 2 is great at maintaining the 'expanded/collapsed' nodes of the
treeview as you click the various nodes on it. The problem is however,
when the application does a response.redirect("../someurl.aspx") the
master page takes this as a new page and resets the treeview control.

Can someone please tell me if there is a way to preserve the expansion
state of the control when they load new pages?

Thanks very much in advance,


Damien Sawyer
 
 
 

Prevent treeview control from reinitialising on master page for page redirects

Post by Andrew Rob » Wed, 15 Feb 2006 02:27:21

Damien,

I have a solution to this in my blog:

http://www.yqcomputer.com/ ,guid,23808645-43b5-4e2a-afb1-53dc8da35636.aspx

Hope this helps,

--

Andrew Robinson
http://www.yqcomputer.com/

 
 
 

Prevent treeview control from reinitialising on master page for page redirects

Post by damiensawy » Wed, 15 Feb 2006 06:58:51

Thanks Andrew - That did the trick perfectly.

Nice solution :-)