Create a new XML file named menu with the following contents:
Then drag and drop a menu control on the page and drop a XmlDataSource control with the ID XmlDataSource1 to set the menu's DataSourceID to XmlDataSource1.
Configure the XmlDataSource control to make the datafile= "~/menu.xml" xpath= "Menu/menuitem", where XPath is used to select the data to filter out the MenuItem data.
At this point, the data for the menu control is then bound, telling the menu control how to display the data filtered from the XML file. Select the Menu control, select DataBindings in the Properties window, in the pop-up dialog box, select MenuItem in the upper-left list, click the Add button to add MenuItem to the lower-left list, and then choose MenuItem in this list, This is the list on the right that will display the property to bind so that navigateurlfield= "url" textfield= "title". Press the OK button to return to the design interface, which will show "home" and "news" two menu items.
Design the HTML code as follows:
<%@ Page language= "C #" autoeventwireup= "true" codebehind= "Default.aspx.cs" inherits= "Coaffiliate._default"%>
untitled page
Http://www.cnblogs.com/ofei/archive/2007/01/20/625745.html