Setting Up the Menu Control
You will need to add a Site Map file to your project, which serves as the data file for the SiteMapDataSource control//网站地图数据源控件 you added in the previous lesson. This file contains the hierarchy of the links//阶梯式链接 shown in the Menu control//菜单控件.
1. In the Solution Explorer right-click the project and select Add New Item. Select the Site Map template and click on the Add button.
| C# | VB | |
|
|
||
After it has been added, the Site Map file is loaded into //载入the Code Editor window.
2. In web.SiteMap replace//取代 the existing the siteMapNode element and its contents with the following XML fragment//XML代码片断.
<siteMapNode url="Default.aspx" title="Home" description="" > <siteMapNode url="ContentPage.aspx" title="My Content Page" description="" /> <siteMapNode url="Authors.aspx" title="Authors" description="" /> </siteMapNode>
You have already added the Authors.aspx page to your project, but it does not yet inherit from//继承自 the Master Page you created. ContentPage.aspx is a page you will create in the next lesson//下一课中. It will inherit from //继承the Master Page.


浙公网安备 33010602011771号