Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > ASP.NET TreeView control bug with NavigateUrl and Target

Reply
Thread Tools

ASP.NET TreeView control bug with NavigateUrl and Target

 
 
PerG
Guest
Posts: n/a
 
      05-27-2008
Hi all,

I have a problem with the ASP.NET 2.0 TreeView Control.

I have added some TreeNodes to my TreeView that has NavigationUrl set to a
webpage, Target set to "_blank" (a new windows) and SelectionMode set to
"Select". Then I added some other nodes that doesn't have NavigationUrl set
("regular" nodes).

When I first click a "regular" node and the page postbacks I read the
SelectedNode property and do whatever I need. Next, if I click a node with
NavigationUrl and Target set, the TreeView seems to be using javascript to
mark the node as selected (in the GUI, both nodes seems selected). It does
not postback and trigger the SelectedNodeChanged event but when my main page
postbacks (when I click a button or whatever) the SelectedNode property on
the TreeView is now changed to the node with NavigationUrl set.

This might be the intention of the .NET Framework, but it seems a little
strange since I want the nodes with NavigationUrl set to be "Navigation Only"
and not interfere with the regular nodes.

I tried to make a custom TreeView and TreeNode class, setting the nodes
selectionmode to "None" and then overriding the RenderPreText and
RenderPostText to render my own A-tag with correct Href- and
Target-attribute, but unfortunately I cannot access Css and Style attributes
and some other vital functions to render on my custom node like the regular
nodes since Microsoft has made all theese properties internal or private (I
checked them with reflector).

Does anyone have a better solution. Should this be considered a bug? If so,
where do I report this?

Regards,
Per
 
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
Problem in setting Target Node and Target Tree Property mohit ASP .Net 0 01-23-2008 05:41 AM
image control - no navigateurl ? euan@madprops.org ASP .Net 4 09-21-2007 04:31 PM
How can I change the NavigateUrl inside the user control ? jeanluc.praz@gmail.com ASP .Net 1 03-08-2006 02:22 AM
HyperLink control; NavigateUrl; IE vs. Mozilla Arthur Dent ASP .Net Web Controls 1 09-30-2005 06:48 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM



Advertisments