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 清單。