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" />
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" />
- ››asp.net页面弄成伪静态页面
- ››Asp.net 中将汉字转换成拼音的方法
- ››ASP.NET及JS中的cookie基本用法
- ››ASP.NET获取MS SQL Server安装实例
- ››asp.net实现调用百度pai 在线翻译英文转中文
- ››ASP.NET页面选项进行提示判断
- ››Asp.net定时执行程序
- ››ASP.NET中利用DataList实现图片无缝滚动
- ››ASP.NET验证控件RequiredFieldValidator
- ››ASP.NET中使用System.Net.Mail发邮件
- ››ASP.NET中获取用户控件中控件的ID
- ››ASP.NET中FileBytes写成文件并存档
更多精彩
赞助商链接