我想写查询smn.ParentNode.ChildNodes
。如果 ShowInNavigation 值为 false,我不想显示。Telerik 站点地图节点具有此属性。何做这个?
using System;
using System.Web;
using Telerik.Sitefinity.Web;
using System.Linq;
using System.Data;
public partial class CustomTemplate_Navigation : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
SiteMapNode smn = SiteMapBase.GetCurrentProvider().CurrentNode;
while (smn.ParentNode != null)
{
if (smn.ParentNode.ParentNode == SiteMap.RootNode)
{
siteMapControl_verticaltree.DataSource = smn.ParentNode.ChildNodes;/*this line will be write query*/
siteMapControl_verticaltree.DataBind();
break;
}
smn = smn.ParentNode;
}
}
}