Version

NavigateUrlFormatString Property (NavItemBinding)

Returns or sets a string value that is used to format the NavigateUrl property of a Node when the Node is being databound.
Syntax
'Declaration
 
Public Property NavigateUrlFormatString As String
public string NavigateUrlFormatString {get; set;}
Example
'Binding WebDataTree to an XmlDataSource topic. 
'Add three webpages ALFKI.aspx, BLONP.aspx and WOLZA.aspx to your project 
'Add the NavigateUrlFields and NavigateUrlFormatString properties to 
'the Customer data binding as shown below 
Dim customer As New DataTreeNodeBinding() 
customer.DataMember = "Customer" 
customer.TextField = "CustomerName" 
customer.ValueField = "CustomerID" 
'Set the navigate url field to be CustomerID 
customer.NavigateUrlFields = "CustomerID" 
'Set the navigate url format string so that it takes to the 
'page with the CustomerID as the name when the corresponding customer node is clicked. 
customer.NavigateUrlFormatString = "~/{0}.aspx"
//Bind WebDataTree to an XmlDataSource as shown in the 
//Binding WebDataTree to an XmlDataSource topic.
//Add three webpages ALFKI.aspx, BLONP.aspx and WOLZA.aspx to your project
//Add the NavigateUrlFields and NavigateUrlFormatString properties to
//the Customer data binding as shown below
DataTreeNodeBinding customer = new DataTreeNodeBinding();
customer.DataMember = "Customer";
customer.TextField = "CustomerName";
customer.ValueField = "CustomerID";
//Set the navigate url field to be CustomerID
customer.NavigateUrlFields = "CustomerID";
//Set the navigate url format string so that it takes to the
//page with the CustomerID as the name when the corresponding customer node is clicked.
customer.NavigateUrlFormatString = "~/{0}.aspx";
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also