asp.net 2.0 (C #) (3)

Source: Internet
Author: User

Introduced

The site navigation provider in ASP.net 2.0 exposes navigation information to pages in the application, allowing you to define the structure of the site independently of the actual physical layout of the page. The default site navigation provider is xml-based, but you can also expose this information from any backend by writing a custom provider for the site map.

The essential

1, create a. sitemap file, is actually an XML file, including a hierarchy of <siteMapNode> elements

2, <siteMapNode> elements of the attributes:

URL-Link Address

Title-The caption displayed

Description-Description (TOOLTIP)

ResourceKey-Localized (to add this attribute to the <siteMap> node Enablelocalization=true)

securityTrimmingEnabled-Do you want Sitemap to support security features

roles-which roles can access the current node, multiple roles separated by commas (need to set securitytrimmingenabled to True)

siteMapFile-Referencing another sitemap file

Note: When applying permissions, the provider of the Sitemap node in web.config should also have a corresponding configuration (securitytrimmingenabled= "true")

3, can access the Sitemap and SiteMapNode class site map data

4. Custom site map providers should write a class that inherits from StaticSiteMapProvider

5, XmlSiteMapProvider Requirements site map node has a unique URL

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.