In ASP. net2.0, two new functions are provided for us to create pages and navigation with consistent features. These two functions are the dashboard page and website navigation. We are very clear about the motherboard page, but when you do the motherboard page, you often need to add a navigation bar, for this Asp.net
2.0 greatly simplifies our work. This is the use of site maps.
As the name suggests, a site map is a map that directs us to a webpage. It consists of nodes and subnodes. As follows:
Adding a site map is the same as adding a common ASP page. Right-click to add a site map. The node is edited using <sitemapnode> </sitemapnode>
Label. The rule is that only one sub-<sitemapnode> element can be contained under the <sitemap> node in the created site map, but multiple <sitemapnode> derived elements can be created under the sub-element.
After completing our site map, you can use the Asp.net navigation control to complete the creation of the navigation bar. In the navigation bar, we can use menu and Treeview
And sitemappath is used when creating the global trace navigation bar.
The navigation control (menu
, Treeview, etc)
It is quite convenient to associate with sitemap. You can specify the datasourceid as your site map. Then run the command to display the navigation bar (CSS decoration is required for beautification ).
What is the global trace navigation bar? It actually refers to the path of your page. :
The method is to associate sitemappath with the site map. The contact method is the same as that of menu and other controls.
The advantage of using a site map to create a navigation bar is convenience, convenience of creation, and convenience of modification.
You can also choose not to use menu or Treeview when creating the navigation bar.
But try to use the site map. OtherwiseTo facilitate the effect.In short, the site map allows you to easily create navigation menus and global trace navigation bars. This article is just an overview of the site map application. For specific technical work, see: http://msdn.microsoft.com/zh-cn/dd218017.aspx
Below is a navigation bar I made (source code: http://download.csdn.net/source/2307723 ):