<%@ Application Language="C#" %>
<%@ Import Namespace="System.IO" %>
<script runat="server">
void Application_Start(object sender, EventArgs e)
{
SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(SiteMap_SiteMapResolve);
}
SiteMapNode SiteMap_SiteMapResolve(object sender, SiteMapResolveEventArgs e)
{
if (SiteMap.CurrentNode == null)
{
string url = e.Context.Request.Path;
string title = Path.GetFileNameWithoutExtension(url);
SiteMapNode newNode = new SiteMapNode(e.Provider, url, url, title);
newNode.ParentNode = SiteMap.RootNode;
return newNode;
}
return SiteMap.CurrentNode;
}
siteMapPath
最新推荐文章于 2020-05-29 17:41:59 发布