SiteMapNode SiteMap_SiteMapResolve(object sender, SiteMapResolveEventArgs e)
{
//string str = "1";
//SiteMapNode currentNode = SiteMap.CurrentNode.Clone(true);
//SiteMapNode tempNode = currentNode;
//tempNode.Url = tempNode.Url + "?type=" + str;
//return currentNode;
SiteMapNode currentNode = SiteMap.CurrentNode.Clone(true);
SiteMapNode tempNode = currentNode;
// Obtain the recent IDs.
//int forumGroupID = 1;
// int type = 2;
//int postID = 3;
// The current node, and its parents, can be modified to include
// dynamic querystring information relevant to the currently
// executing request.
//if (0 != postID)
//{
// tempNode.Url = tempNode.Url + "?PostID=" + postID.ToString();
//}
if ((null != (tempNode = tempNode.ParentNode)) &&
(0 != type))
{
tempNode.Url = tempNode.Url + "?type=" + type.ToString();
}
//if ((null != (tempNode = tempNode.ParentNode)) &&
//(0 != forumGroupID))
//{
// tempNode.Url = tempNode.Url + "?ForumGroupID=" + forumGroupID.ToString();
//}
return currentNode;
}
{
//string str = "1";
//SiteMapNode currentNode = SiteMap.CurrentNode.Clone(true);
//SiteMapNode tempNode = currentNode;
//tempNode.Url = tempNode.Url + "?type=" + str;
//return currentNode;
SiteMapNode currentNode = SiteMap.CurrentNode.Clone(true);
SiteMapNode tempNode = currentNode;
// Obtain the recent IDs.
//int forumGroupID = 1;
// int type = 2;
//int postID = 3;
// The current node, and its parents, can be modified to include
// dynamic querystring information relevant to the currently
// executing request.
//if (0 != postID)
//{
// tempNode.Url = tempNode.Url + "?PostID=" + postID.ToString();
//}
if ((null != (tempNode = tempNode.ParentNode)) &&
(0 != type))
{
tempNode.Url = tempNode.Url + "?type=" + type.ToString();
}
//if ((null != (tempNode = tempNode.ParentNode)) &&
//(0 != forumGroupID))
//{
// tempNode.Url = tempNode.Url + "?ForumGroupID=" + forumGroupID.ToString();
//}
return currentNode;
}
![](https://i-blog.csdnimg.cn/blog_migrate/5a23052a871149843d8fe34672e1bd7a.gif)