WEB开发网
开发学院WEB开发ASP.NET asp.net站点地图使用 阅读

asp.net站点地图使用

 2009-10-29 16:51:06 来源:WEB开发网   
核心提示:<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto
<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:新宋体; panose-1:2 1 6 9 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"\@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"\@新宋体"; panose-1:2 1 6 9 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0mm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:42.55pt; mso-footer-margin:49.6pt; mso-paper-source:0; layout-grid:15.6pt;} div.Section1 {page:Section1;} -->

asp.net 站点地图的使用

 

站点地图文件:

Web.sitemap

 

<? xml version = "1.0 " encoding = "utf-8 "?>

< siteMap xmlns = "http://schemas.microsoft.com/AspNet/SiteMap-File-1.0 ">

 < siteMapNode url = "default.aspx " title = " 首页 " description = "">

  < siteMapNode url = "Supply.aspx " title = " 产品信息 " description = "" >

   < siteMapNode url = "PRoductdetails.aspx " title = " 产品详细信息 " description = "" />

  </ siteMapNode >

  < siteMapNode url = "register.aspx " title = " 新用户注册 "/>

  < siteMapNode url = "Demand.aspx " title = " 产品信息 " description = "">

  </ siteMapNode >

  < siteMapNode url = "Projects.aspx " title = " 招投标信息 " description = "">

   < siteMapNode url = "DownLoad.aspx " title = " 相关表格下载 " description = "" />

   < siteMapNode url = "ProjectInfor.aspx " title = " 招投标详细信息 " description = "" />

  </ siteMapNode >

  < siteMapNode url = "newsfront.aspx " title = " 新闻 " description = "">

   < siteMapNode url = "news_detail.aspx " title = " 行业资讯详细信息 " description = "" />

   < siteMapNode url = "company_details.aspx " title = " 会员展厅详细信息 " description = "" />

   < siteMapNode url = "ManuscriptFront.aspx " title = " 在线投稿 " description = "" />

   < siteMapNode url = "subject_detail.aspx " title = " 专题栏目详细信息 " description = "" />

   < siteMapNode url = "expertinterview_detail.aspx " title = " 人物专访详细信息 " description = "" />

  </ siteMapNode >

  < siteMapNode url = "ForeTrain.aspx " title = " 培训咨询 " description = "">

   < siteMapNode url = "TrainInfor.aspx " title = " 培训详细信息 " description = "" />

   < siteMapNode url = "BusiHandBook.aspx " title = " 商务手册 " description = "" />

   < siteMapNode url = "Technology.aspx " title = " 技术咨询 " description = "">

    < siteMapNode url = "TechInfor.aspx " title = " 技术信息 " description = ""/>

   </ siteMapNode >

   < siteMapNode url = "Expert.aspx " title = " 专家顾问团 " description = "" />

  </ siteMapNode >

  < siteMapNode url = "ExhibitFront.aspx " title = " 机电信息展览馆 " description = "">

   < siteMapNode url = "exhibit_detail.aspx " title = " 会展详细信息 " description = ""/>

  </ siteMapNode >

 </ siteMapNode >

</ siteMap >

 

 

Web.config 配置

 

 

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

 

前台代码:

 

< asp : TreeView ID ="TreeView1" runat ="server" DataSourceID ="SiteMapDataSource1">

      </ asp : TreeView >

    </ div >

    < asp : SiteMapDataSource ID ="SiteMapDataSource1" runat ="server" SiteMapProvider ="XmlSiteMapProvider" /> 

Tags:asp net 站点

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接