Tab

TreeViewNode.NavigateUrl Property

Gets or sets a URL which defines the navigation location.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

[DefaultValue("")]
public string NavigateUrl { get; set; }

Property Value

Type Default Description
String

String.Empty

A string value, specifying a URL where the client web browser will navigate.

Remarks

Use the NavigateUrl property to specify a URL to which the client web browser navigates whenever the current node is clicked.

NOTE

If the NavigateUrl property is not empty, the tree view implements a default navigation to the specified URL even if the ASPxClientTreeView.NodeClick event handler provides a custom scenario.

Example

The code below adds a node with the default settings to the ASPxTreeView’s child collection, and then initializes its main properties.

The image below shows the result.

TreeView - Add

using DevExpress.Web.ASPxTreeView;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        TreeViewNode node = ASPxTreeView1.Nodes.Add();
        node.Text = "Home";
        node.Image.Url = "~/Images/Home.png";
        node.Name = "Home page";
        node.NavigateUrl = "https://www.devexpress.com/";
        node.Target = "_blank";
        node.ToolTip = "DevEx Home Page";
    }
}
See Also