SiteMapNode.Roles 属性

定义

获取或设置与 SiteMapNode 对象关联的角色集合,这些角色用于安全修整期间。

public:
 property System::Collections::IList ^ Roles { System::Collections::IList ^ get(); void set(System::Collections::IList ^ value); };
public System.Collections.IList Roles { get; set; }
member this.Roles : System.Collections.IList with get, set
Public Property Roles As IList

属性值

IList

角色的 IList

例外

该节点是只读的。

注解

如果启用了安全修整,站点映射提供程序将生成当前用户能够查看的节点节点树,部分基于当前用户分配的角色是否包含在集合中 Roles 。 URL 授权和文件授权还用于确定用户是否有权访问 SiteMapNode 对象。 有关授权的详细信息,请参阅 ASP.NET 授权

首次创建该构造函数时,可以使用 SiteMapNode 构造函数向 SiteMapNode 对象提供角色列表。

适用于

另请参阅