先新建了一个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="Home" description="Home Page">
<siteMapNode url="News.aspx" title="News" description="The Latest News"/>
<siteMapNode url="News.aspx?cat=us" title="U.S" description="U.S. News"/>
<siteMapNode title ="World" description="World News" url="News.aspx?cat=world"/>
<siteMapNode title="Technology" description="Technology News" url="News.aspx?cat=tech"/>
<siteMapNode title="Sports" description="Sports News" url="News.aspx?cat=sport"/>
</siteMapNode>
<siteMapNode title="Finance" description="The Latest Financial Information" url="Finance.aspx">
<siteMapNode title="Quotes" description="Get the Latest Quotes" url="Quotes.aspx">
<siteMapNode title="Markets" description="The Latest Market Information" url="Markets.aspx">
<siteMapNode title="U.S. Market Report" description="Looking at the U.S. Market" url="MarketsUS.aspx"/>
<siteMapNode title="NYSE" description="The New York Stock Exchange" url="NYSE.aspx"/>
</siteMapNode>
<siteMapNode title="Funds" description="Mutual Funds" url="Funds.aspx"/>
</siteMapNode>
<siteMapNode title="Weather" description="The Latest Weather" url="Weather.aspx"/>
</siteMapNode>
</siteMap>然后建了一个Web窗体,拖了一个SiteMapPath控件,代码如下:
<asp:SiteMapPath ID="SiteMapPath1" runat="server"/>
</asp:SiteMapPath>在浏览器中查看,为什么什么都没有呢?定义在Web.sitemap中的结点都没有显示。
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="Home Page">
<siteMapNode url="News.aspx" title="News" description="The Latest News"/>
<siteMapNode url="News.aspx?cat=us" title="U.S" description="U.S. News"/>
<siteMapNode title ="World" description="World News" url="News.aspx?cat=world"/>
<siteMapNode title="Technology" description="Technology News" url="News.aspx?cat=tech"/>
<siteMapNode title="Sports" description="Sports News" url="News.aspx?cat=sport"/>
</siteMapNode>
<siteMapNode title="Finance" description="The Latest Financial Information" url="Finance.aspx">
<siteMapNode title="Quotes" description="Get the Latest Quotes" url="Quotes.aspx">
<siteMapNode title="Markets" description="The Latest Market Information" url="Markets.aspx">
<siteMapNode title="U.S. Market Report" description="Looking at the U.S. Market" url="MarketsUS.aspx"/>
<siteMapNode title="NYSE" description="The New York Stock Exchange" url="NYSE.aspx"/>
</siteMapNode>
<siteMapNode title="Funds" description="Mutual Funds" url="Funds.aspx"/>
</siteMapNode>
<siteMapNode title="Weather" description="The Latest Weather" url="Weather.aspx"/>
</siteMapNode>
</siteMap>然后建了一个Web窗体,拖了一个SiteMapPath控件,代码如下:
<asp:SiteMapPath ID="SiteMapPath1" runat="server"/>
</asp:SiteMapPath>在浏览器中查看,为什么什么都没有呢?定义在Web.sitemap中的结点都没有显示。
解决方案 »
- 在asp.net中怎么知道一个页面或一个控件所触发的时间执行了多少时间
- winserver2003怎样安装消息队列服务
- 晕,session 怎么不起作用呢?
- 关于用ASP.NET实现在线论坛~~~~~
- asp.net交流群46522776 好友征集中......
- GridView的选择删除列为英文(select delete),急求
- 在DataGrid模板列中放PlaceHolder,ItemCreate动态创建textbox空间,如何设置宽度和数据绑定!!
- 银联接口求助!!!
- 在页面直接贴图,请教各位,谢谢!
- 我的DADEGRID控件显示了很多数据,我现在想让它一页一页的显示数据,所以我把它的属性设置了一下?但是我不记得在哪个事件里写代码了?
- startIndex 不能大于字符串长度
- 对路径“E:\我的文档\Visual Studio 2005\WebSites\Search\crawled\segments”的访问被拒绝
defaultProvider="provider name">
<providers>...</providers>
</siteMap>在web.config文件中配置