deeisner
asked on
Accessing ASP.NET TreeView Node Attributes
Does anyone know if there is a way to access the innerHTML or innerText properties of a TreeNode object?
There are only a few methods accessible for the Nodes of a TreeViewNodes object collection including Text, NavigateURL, ImageURL and Target. But I am wanting to add a custom attribute to the Node (not TreeView) level such as "rel=nofollow" to the Node's <a> tag.
There seems to be no way to do this on the Server side.
Does anyone have a solution that might work on either the Server or Client script side?
Thanks
There are only a few methods accessible for the Nodes of a TreeViewNodes object collection including Text, NavigateURL, ImageURL and Target. But I am wanting to add a custom attribute to the Node (not TreeView) level such as "rel=nofollow" to the Node's <a> tag.
There seems to be no way to do this on the Server side.
Does anyone have a solution that might work on either the Server or Client script side?
Thanks
I think that YourTreeView.Node(yourNode ).Attribut es.Add("re l","nofoll ow") should work.
ASKER
no, there is no Attribute or Attributes property at the TreeNode level. Only for the container TreeView object. Thanks though
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great idea, thank you.