SiteMapNode.Roles 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得與 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。
例外狀況
節點為唯讀。
備註
如果啟用安全性調整,網站地圖提供者會根據目前使用者指派的角色是否包含在集合中 Roles ,建置目前使用者能夠檢視的節點節點樹狀結構。 URL 授權和檔案授權也可用來判斷使用者是否有權存取 SiteMapNode 物件。 如需授權的詳細資訊,請參閱ASP.NET 授權。
您可以使用 建 SiteMapNode 構函式,在物件第一次建立時提供角色 SiteMapNode 清單給物件。