[ASP. NET] site map Web. sitemap

Source: Internet
Author: User

1. Add a website map item Web. sitemap item

2. Write the Web. sitemap item as follows:

<? Xml version = "1.0" encoding = "UTF-8"?>
<SiteMap xmlns = "http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<SiteMapNode url = "default. aspx" title = "Homepage" description = "">
<SiteMapNode url = "Supply. aspx" title = "Product Information" description = "">
<SiteMapNode url = "productdetails. aspx" title = "product details" description = ""/>
</SiteMapNode>
<SiteMapNode url = "register. aspx" title = "New User Registration"/>
<SiteMapNode url = "Demand. aspx" title = "Product Information" description = "">
</SiteMapNode>
<SiteMapNode url = "Projects. aspx" title = "bidding information" description = "">
<SiteMapNode url = "DownLoad. aspx" title = "related table DownLoad" description = ""/>
<SiteMapNode url = "ProjectInfor. aspx" title = "bidding details" description = ""/>
</SiteMapNode>
<SiteMapNode url = "newsfront. aspx" title = "news" description = "">
<SiteMapNode url = "news_detail.aspx" title = "industry information details" description = ""/>
<SiteMapNode url = "company_details.aspx" title = "member showroom details" description = ""/>
<SiteMapNode url = "ManuscriptFront. aspx" title = "online contribution" description = ""/>
<SiteMapNode url = "subject_detail.aspx" title = "topic details" description = ""/>
<SiteMapNode url = "expertinterview_detail.aspx" title = "Interview detail" description = ""/>
</SiteMapNode>
<SiteMapNode url = "ForeTrain. aspx" title = "training consulting" description = "">
<SiteMapNode url = "trainininfor. aspx" title = "training details" description = ""/>
<SiteMapNode url = "BusiHandBook. aspx" title = "Business Manual" description = ""/>
<SiteMapNode url = "Technology. aspx" title = "Technical Consultation" description = "">
<SiteMapNode url = "TechInfor. aspx" title = "Technical Information" description = ""/>
</SiteMapNode>
<SiteMapNode url = "Expert. aspx" title = "Expert Consultant" description = ""/>
</SiteMapNode>
<SiteMapNode url = "ExhibitFront. aspx" title = "" description = "">
<SiteMapNode url = "exhibit_detail.aspx" title = "Exhibition Details" description = ""/>
</SiteMapNode>
</SiteMapNode>
</SiteMap>

3. The configuration in the web. config file is as follows:

<System. web>
<SiteMap defaultProvider = "XmlSiteMapProvider" enabled = "true">
<Providers>
<Add name = "XmlSiteMapProvider"
Description = "SiteMap provider which reads in. sitemap XML files ."
Type = "system. Web. xmlsitemapprovider, system. Web, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a"
Sitemapfile = "Web. sitemap"/>
</Providers>
</Sitemap>
</System. Web>

4. Place the sitemappath control at the location of the website map on the page and set the sitemapprovider attribute of sitemappath to the value of name in the config file: xmlsitemapprovider
The website map is created.

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.