Navigating to a URL
RadTreeView allows three types of Node actions:
URL navigation (NavigateUrl attribute)
Client-side JavaScript events (ClientEvent attribute)
Server-side postback events (PostBack attribute)
URL Navigation
If you want a particular Node to navigate to a given URL location, set the NavigateUrl attribute.
This code sets the tree Node myNode to be a link to relative URL location "auctions.aspx?id=4". | //codeRadTreeNode myNode= new RadTreeNode ();myNode.NavigateUrl = "auctions.aspx?id=4"; |
---|---|
This XML code has the same effect as the one above. It sets the tree Node "MyLabel" to be a link to the same URL location "auctions.aspx?id=4" | // xml |
URL Navigation (frames)
RadTreeView fully supports frames, as well. You can set URL Navigation for a specified frame by using the Target attribute. Note: Target supports "_blank" for opening in a new window.
RadTreeNode myNode = new RadTreeNode ();
myNode.NavigateUrl = "auctions.aspx?id=4";
myNode.Target = "contentFrame";
Dim myNode As New RadTreeNode()
myNode.NavigateUrl = "auctions.aspx?id=4"
myNode.Target = "contentFrame"
<node text="MyLabel" navigateurl="auctions.aspx?id=4" target="contentFrame" />
For URL links outside your site you must provide full URL, i.e. NavigateUrl="http://www.yahoo.com"