Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > TreeNode objects inaccesible during postback

Reply
Thread Tools

TreeNode objects inaccesible during postback

 
 
Phil H
Guest
Posts: n/a
 
      10-10-2006
Hi

Can anyone tell why the SelectedNode property of a TreeView is
sometimes inaccessible during a postback event?

I developed a small web application recently that features a TreeView.
The nodes are created programatically but the TreeView itself is
created at design time.

I also used a mulitview object and several views, the Tree being in one
of them. I found that I can access the tree during postback events so
long as it is generated by a control in the same view as the tree (i.e.
the host view set active) but if I switch to another view and then
process events from controls there the SelectNode property returns null
(or nothing in VB).

The curious thing is that the Tree is recreated in tact with the same
selected node when the view is re-activated, ie. it is preserved by
Viewstate. Yet I can access controls in other hidden views (e.g.label
objects) from the view containing the tree any time I like.

Has this got anything to do with the fact that the nodes are created
programatically?

I've had this sort of anxst before with VS2003. I get terribly confused
over what is preserved and what is not between postbacks.

I'd be very greatful to anyone who can shed some light on this.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
website inaccesible muse Software 2 12-10-2012 01:17 AM
How to setfocus and keep currentselected Treenode VISIBLE after postback (VB) ton ASP .Net 0 04-02-2008 06:06 PM
what is equivalent of vb.net treenode.nextnode property in asp.net webcontrols.treenode tanya foster ASP .Net 3 05-18-2006 05:58 PM
internet inaccesible Unk Computer Support 2 07-26-2004 08:06 PM
Beginner needs help. *SOME* https sites inaccesible through router ??? big chris Cisco 4 01-18-2004 11:30 PM



Advertisments