WebPartManager.WebPartAdding Evento

Definición

Aparece durante el proceso de agregar un control WebPart dinámico u otro control de servidor a una zona WebPartZoneBase.Occurs during the process of adding a dynamic WebPart or other server control to a WebPartZoneBase zone.

public:
 event System::Web::UI::WebControls::WebParts::WebPartAddingEventHandler ^ WebPartAdding;
public event System.Web.UI.WebControls.WebParts.WebPartAddingEventHandler WebPartAdding;
member this.WebPartAdding : System.Web.UI.WebControls.WebParts.WebPartAddingEventHandler 
Public Custom Event WebPartAdding As WebPartAddingEventHandler 

Tipo de evento

WebPartAddingEventHandler

Comentarios

El WebPartAdding método genera el evento OnWebPartAdding después de que se haya iniciado el proceso de agregar un control a una zona.The WebPartAdding event is raised by the OnWebPartAdding method after the process of adding a control to a zone has begun. Este evento proporciona una oportunidad para cancelar el proceso antes de que se complete.This event provides an opportunity to cancel the process before it is complete. Si el proceso de adición se realiza correctamente, este evento va seguido del WebPartAdded evento.If the adding process is successful, this event is followed by the WebPartAdded event.

Los desarrolladores de páginas pueden proporcionar controladores personalizados para el evento agregando el OnWebPartAdding atributo al <asp:webpartmanager> elemento en una página y asignando un nombre de método personalizado al atributo.Page developers can provide custom handlers for the event by adding the OnWebPartAdding attribute to the <asp:webpartmanager> element in a page, and assigning a custom method name to the attribute.

Se aplica a

Consulte también