標籤:public 文章 bpa 網站 obj net tar oid tno
原文發布時間為:2008-07-29 —— 來源於本人的百度文章 [由搬家工具匯入]
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class sitemap : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SiteMap.SiteMapResolve+=new SiteMapResolveEventHandler(SiteMap_SiteMapResolve);
}
SiteMapNode SiteMap_SiteMapResolve(object sender,SiteMapResolveEventArgs e)
{
SiteMapNode currentNode = SiteMap.CurrentNode.Clone(true);
SiteMapNode tempNode=currentNode;
int id=nid();
int page=npage();
if (id > 0)
{
tempNode.Url = tempNode.Url + "?id=" + id.ToString();
}
if (id > 0 && page >= 0)
{
tempNode.Url = tempNode.Url + "&page=" + page.ToString();
}
else if (page >= 0)
{
tempNode.Url = tempNode.Url + "?page=" + page.ToString();
}
return tempNode;
}
private int nid()
{
return 2;
}
private int npage()
{
return 3;
}
}
net5:動態修改記憶體中的網站地圖節點