SiteMapPath Basic Usage

Source: Internet
Author: User

1. Add a Site Map item Web.sitemap Item

2. The wording of the Web.sitemap entry is as follows:

<?XML version= "1.0" encoding= "Utf-8"?><SiteMapxmlns= "http://schemas.microsoft.com/AspNet/SiteMap-File-1.0"><SiteMapNodeURL= "default.aspx"title= "Home"Description="">    <SiteMapNodeURL= "Supply.aspx"title= "Product Information"Description="" >      <SiteMapNodeURL= "Productdetails.aspx"title= "Product Details"Description="" />    </SiteMapNode><SiteMapNodeURL= "Register.aspx"title= "New user Registration"/>    <SiteMapNodeURL= "Demand.aspx"title= "Product Information"Description="">         </SiteMapNode>    <SiteMapNodeURL= "Projects.aspx"title= "Bidding Information"Description="">      <SiteMapNodeURL= "Download.aspx"title= "Related form Download"Description="" />      <SiteMapNodeURL= "Projectinfor.aspx"title= "Bidding Details"Description="" />    </SiteMapNode>    <SiteMapNodeURL= "Newsfront.aspx"title= "News"Description="">      <SiteMapNodeURL= "News_detail.aspx"title= "Industry Information Details"Description="" />      <SiteMapNodeURL= "Company_details.aspx"title= "Member Showroom Details"Description="" />      <SiteMapNodeURL= "Manuscriptfront.aspx"title= "Online Submission"Description="" />      <SiteMapNodeURL= "Subject_detail.aspx"title= "feature column Details"Description="" />      <SiteMapNodeURL= "Expertinterview_detail.aspx"title= "People interview details"Description="" />    </SiteMapNode>    <SiteMapNodeURL= "Foretrain.aspx"title= "Training consultation"Description="">      <SiteMapNodeURL= "Traininfor.aspx"title= "Training Details"Description="" />      <SiteMapNodeURL= "Busihandbook.aspx"title= "Business Handbook"Description="" />      <SiteMapNodeURL= "Technology.aspx"title= "Technical Consultation"Description="">        <SiteMapNodeURL= "Techinfor.aspx"title= "Technical Information"Description=""/>      </SiteMapNode>      <SiteMapNodeURL= "Expert.aspx"title= "Expert Advisory Panel"Description="" />    </SiteMapNode>    <SiteMapNodeURL= "Exhibitfront.aspx"title= "Electromechanical Information Center"Description="">      <SiteMapNodeURL= "Exhibit_detail.aspx"title= "Event Details"Description=""/>    </SiteMapNode></SiteMapNode></SiteMap>

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

<system.web><SiteMapdefaultprovider= "XmlSiteMapProvider"enabled= "true">      <providers>        <Addname= "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, in the page need site map location into the SiteMapPath control, set SiteMapPath SiteMapProvider property is the value of the name in the config file: XmlSiteMapProvider

The creation of the site map is completed

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.