Navigation of site maps on ASP. NET web pages

Source: Internet
Author: User

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 ):


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.