バージョン

NavigateUrlFormatString プロパティ (NavItemBinding)

ノードがデータ バインドされている場合、ノードの NavigateUrl プロパティをフォーマットするために使用される文字列値を取得または設定します。
シンタックス
'宣言
 
Public Property NavigateUrlFormatString As String
public string NavigateUrlFormatString {get; set;}
使用例
'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";
参照