Set the NavigateUrl property of the TreeNode to an empty string:
"The text of a node in the TreeView control can be in one of two modes:
selection mode or navigation mode. By default, a node is in selection mode.
To put a node into navigation mode, set the node's NavigateUrl property to a
value other than an empty string (""). To put a node into selection mode, set
the node's NavigateUrl property to an empty string."
http://msdn2.microsoft.com/en-us/lib...de(VS.80).aspx
--
HTH,
Phillip Williams
http://www.societopia.net http://www.webswapp.com
"dave.dolan" wrote:
I have generated a nice tree view that displays some otherwise cyptic XML in
an easy to follow manner. The trouble is that the TreeView assumes that I'm
wanting a link in each of the nodes, and I really just want to display them
for view only. How can I disable the link-ness of the data in the tree view?
I have tried setting the target of the links to "javascript:false;" but it
still causes a postback and flashes the page to the top destroying my scroll
position.
Am I missing something?