'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";