PersonalizationState.GetAuthorizationFilter(String) 方法

定义

检索指定 Web 部件控件的授权筛选器。Retrieves the authorization filter for the specified Web Parts control.

public:
 abstract System::String ^ GetAuthorizationFilter(System::String ^ webPartID);
public abstract string GetAuthorizationFilter (string webPartID);
abstract member GetAuthorizationFilter : string -> string
Public MustOverride Function GetAuthorizationFilter (webPartID As String) As String

参数

webPartID
String

从中检索 AuthorizationFilter 的 Web 部件控件的 ID。The ID of the Web Parts control from which the AuthorizationFilter is retrieved.

返回

String

Web 部件控件的授权筛选器字符串。The authorization filter string for a Web Parts control.

注解

此方法在 AuthorizationFilter WebPart 创建控件的实例之前返回该控件的字符串。This method returns the AuthorizationFilter string for a WebPart control before an instance of it is created. null如果没有属性的个性化值,则此方法应返回 AuthorizationFilterThis method should return null if there is no personalized value for the AuthorizationFilter property.

Web 部件控件集不实现属性的任何默认行为 AuthorizationFilterThe Web Parts control set does not implement any default behavior for the AuthorizationFilter property. 提供属性是为了使开发人员可以将任意字符串值分配给自定义 WebPart 控件; 可以通过订阅 AuthorizeWebPart 页面上控件上的事件来检查此属性 WebPartManager ,以确定控件是否可以添加到页中。The property is provided so that a developer can assign an arbitrary string value to a custom WebPart control; this property can be checked by subscribing to the AuthorizeWebPart event on the WebPartManager control on a page to determine whether the control can be added to the page.

适用于