SiteMapNode.NextSibling 属性

定义

获取与当前节点位于相同层级、相对于 ParentNode 属性的下一个 SiteMapNode 节点(如果存在)。Gets the next SiteMapNode node on the same hierarchical level as the current one, relative to the ParentNode property (if one exists).

public:
 virtual property System::Web::SiteMapNode ^ NextSibling { System::Web::SiteMapNode ^ get(); };
public virtual System.Web.SiteMapNode NextSibling { get; }
member this.NextSibling : System.Web.SiteMapNode
Public Overridable ReadOnly Property NextSibling As SiteMapNode

属性值

SiteMapNode

位于父节点之下、当前节点之后的下一个相邻 SiteMapNode;否则,如果不存在父节点,或此节点之后没有节点,或者启用了安全修整并且用户不能查看父节点或下一个同级节点,则为 nullThe next SiteMapNode, serially, after the current one, under the parent node; otherwise, null, if no parent exists, there is no node that follows this one, or security trimming is enabled and the user cannot view the parent or next sibling nodes.

注解

NextSibling属性假设 SiteMapProvider 对象实现其内部集合,以便当父节点检索其 ChildNodes 属性时,节点的顺序与它们在站点映射中出现的顺序相同。The NextSibling property presumes that the SiteMapProvider object implements its internal collections such that when a parent node retrieves its ChildNodes property, the nodes are in the same order as they appear in the site map. 如果你在站点地图提供程序的实现中使用 .NET Framework 集合类,请选择实现接口的集合 IList ,如 ArrayListListDictionary 类。If you use .NET Framework collection classes in an implementation of a site map provider, choose collections that implement the IList interface, such as the ArrayList or ListDictionary classes. 如果选择不实现接口的集合( IListHashtable 类),则简单的站点导航操作可能会产生意外的结果。If you choose collections that do not implement the IList interface, such as the Hashtable class, unexpected results can occur for simple site navigation operations.

适用于

另请参阅