Link to home
Start Free TrialLog in
Avatar of Camillia
CamilliaFlag for United States of America

asked on

Build my treeview only once

Not sure how to fix this:
I have a master page. I reserve the left side for my menu options.
I have, for example, 5 pages. on p5.aspx, I display the treeview.
User clicks on a node and goes to p6.aspx.

*** issue: I have to keep building the treeview for each page. I want to build it once and have it stick for all the pages. Do I need to use a second master page with only the treeview on it? I even used a usercontrol but even with that..with each node clicked, with each new page displayed, the side treeview has to be built.
Any ideas?
Avatar of ShazbotOK
ShazbotOK
Flag of United States of America image

if you have the treeview in the page_load statement you may want to setup validation as to "isnewsession" or "ispostback" so the object does not get rebuilt every time
ASKER CERTIFIED SOLUTION
Avatar of monarch_ilhan
monarch_ilhan
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Camillia

ASKER

I do have "ispostback" . Each page will use Master page.  I did this for uniform look and feel.
So, p1.aspx, p2.aspx, p3.aspx, p4.aspx. p5.aspx...ALL have the Master page.

I display the treeview in p5.aspx and want it to stick.

Now, p6.aspx (this is the one related to the treeview node) also has the master page. So, when i click on the node, i go to p6.aspx, Master page is called again and the treeview has to be binded again. Otherwise, outside ispostback, inside ispostback wont make a differece.

I dont think this is doable..i think i have to keep rebuilding the treeview for each page that I call from the treeview node...
Monarch - i didnt see your note , let me read...
Do you think keeping the treeview in a session is not bad...at most 100 users... 20 nodes and at most 20 subnodes under SOME of the nodes...