แก้ไข

แชร์ผ่าน


WebPartAuthorizationEventHandler Delegate

Definition

Represents the method that handles the AuthorizeWebPart event of a WebPartManager object.

public delegate void WebPartAuthorizationEventHandler(System::Object ^ sender, WebPartAuthorizationEventArgs ^ e);
public delegate void WebPartAuthorizationEventHandler(object sender, WebPartAuthorizationEventArgs e);
type WebPartAuthorizationEventHandler = delegate of obj * WebPartAuthorizationEventArgs -> unit
Public Delegate Sub WebPartAuthorizationEventHandler(sender As Object, e As WebPartAuthorizationEventArgs)

Parameters

sender
Object

The source of the event.

Remarks

The AuthorizeWebPart event is raised before a Web Parts control is added to a Web Parts zone. You can specify which Web Parts controls can be added to a zone by customizing how the event is handled. The method specified in the WebPartAuthorizationEventHandler delegate is called when an AuthorizeWebPart event is raised.

Page developers can provide custom handlers for Web Parts events by adding an OnAuthorizeWebPart attribute to the <asp:webpartmanager> element in a page, and assigning a custom method name to the attribute. A custom handler can also be assigned programmatically. For more information about how to subscribe to an event, see How to: Raise and Consume Events.

Extension Methods

GetMethodInfo(Delegate)

Gets an object that represents the method represented by the specified delegate.

Applies to