
Configuring the First Data Source
Because the first menu displays only a single level of static menu items, you need to configure its data source to display the appropriate portion of the Web.sitemap file. In this case, it is the second-level elements: Products, Services, and Support.
The default bindings of the Menu control to a SiteMapDataSource control make each menu item a navigation link. Because you want to programmatically control the behavior of another menu, you use custom bindings so these menu items do not act as navigation links but instead cause a postback to occur so the second menu can be updated.
To configure the first data source
-
View the Default.aspx page in Design view, and then click the smart tag on the Menu control.
The Menu Tasks dialog box appears.
-
Click Edit MenuItem Databindings.
-
In the Menu DataBindings Editor, in the Available data bindings drop-down list, select SiteMapNode and click Add.
-
Select TextField in the Data binding properties drop-down list and select Title from the drop-down menu. Click OK.
-
Select the SiteMapDataSource control.
-
In Properties, set ShowStartingNode to False.