473,382 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Retain treeview state during navigation

We are using a TreeView defined in a MasterPage for navigation.
The tree holds it's state turing postbacks just fine since it's using
viewstate. But whenever a node click results in a redirect to a new content
page the tree state is lost and the tree needs to be re-initialized.

Any tips on how to retain the state of the three also during non post-back
or requests (GET requests or Response.Redirect).

Some how I need to store the whole tree (nodes, states and all) to Session
or something similar. But I'm at loss on how.

--
Pål Andreassen
ne**@codroe.com
Mar 10 '06 #1
4 2595
DWS
What does "turing navigation" mean?
What does tree Initialization mean?

Thanks
DWS
"PÃ¥l Andreassen" wrote:
We are using a TreeView defined in a MasterPage for navigation.
The tree holds it's state turing postbacks just fine since it's using
viewstate. But whenever a node click results in a redirect to a new content
page the tree state is lost and the tree needs to be re-initialized.

Any tips on how to retain the state of the three also during non post-back
or requests (GET requests or Response.Redirect).

Some how I need to store the whole tree (nodes, states and all) to Session
or something similar. But I'm at loss on how.

--
PÃ¥l Andreassen
ne**@codroe.com

Mar 10 '06 #2
I have just discovered this very same problem 2 hours ago.

The treeview works fine for browsing (expanding / contracting nodes) however
when transfer to a new page occurs the treeview is completely reset to its
original state.

I need it to maintain the users selection of expanded and contracted nodes.

Is this a bug with the treeview control ????
"PÃ¥l Andreassen" wrote:
We are using a TreeView defined in a MasterPage for navigation.
The tree holds it's state turing postbacks just fine since it's using
viewstate. But whenever a node click results in a redirect to a new content
page the tree state is lost and the tree needs to be re-initialized.

Any tips on how to retain the state of the three also during non post-back
or requests (GET requests or Response.Redirect).

Some how I need to store the whole tree (nodes, states and all) to Session
or something similar. But I'm at loss on how.

--
PÃ¥l Andreassen
ne**@codroe.com

Mar 10 '06 #3
=?Utf-8?B?RFdT?= <DW*@discussions.microsoft.com> wrote in
news:16**********************************@microsof t.com:
What does "turing navigation" mean?
What does tree Initialization mean?


Sorry, that should have been "during navigation".

As for tree initialization I mean the process of figuring out which nodes
should be in the tree. That is dependant on the logged-in users rights, the
context, what applications are installed and so on.

--
Pål Andreassen
ne**@codroe.com
Mar 13 '06 #4
=?Utf-8?B?ZGV3ZXlkb2c=?= <de******@discussions.microsoft.com> wrote in
news:E0**********************************@microsof t.com:
I have just discovered this very same problem 2 hours ago.

The treeview works fine for browsing (expanding / contracting nodes)
however when transfer to a new page occurs the treeview is completely
reset to its original state.

I need it to maintain the users selection of expanded and contracted
nodes.

Is this a bug with the treeview control ????


So, this is a consequence of how web controls store state in the VIEWSTATE
during postsbacks. When a navigation occurs (a redirect / normal GET
request) to a "new" page/URL there is no viewstate and hence the tree
looses it's state. Remember that webpages are essentially state-less. What
we are trying is to implement state accross multiple pages, and there
normally where Session (or querystrings) come to the rescue.

--
Pål Andreassen
ne**@codroe.com
Mar 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

42
by: lauren quantrell | last post by:
So many postings on not to use the treeview control, but nothing recently. Is it safe to swim there yet with Access 2000-Access 2003?
1
by: R. Sammut | last post by:
Hi, I have a treeview control that is updated every 30 seconds. The treeview nodes are cleared and new nodes (same number of nodes and hierarchy) are added to the treeview. Now I need to save...
0
by: xzzy | last post by:
I am using www.obout.com 's treeview control and their postback dll ( for an aspx web page ). The treeview and no postback works, BUT the postback dll keeps getting removed from the solution. No...
2
by: damiensawyer | last post by:
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...
6
by: cyriel1920 | last post by:
Hi, I use the selectednodestyle with a white background so the user can see which item was chosen in the treeview navigation. The nodes have a navigateURL with a target to another frame....
0
by: uncensored | last post by:
Hi, Sort of new with the whole treeview control and I was wondering is there a way to build a treeview menu using my SQL data I pull from a database instead of having to hard code it into the...
1
by: lior | last post by:
Hello, I have a treeview control that I use as a menu & navigation control within a master page. The nodes for this control are loaded from a database. Is there any simple method of...
1
by: Nikron | last post by:
Hi, I'm having an issue with the ASP.NET 2.0 Treeview control and persisting its' state accross requests. My Control is embedded within a master page and is used for site navigation. My problem...
0
by: vingomail | last post by:
Good Morning, I have two site map: "common.sitemap, loginuser.sitemap", two master page:" common.master, loginuser.master", in common.master, there is a Navigation control: TreeView...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.