WebPartAddingEventArgs Class

 

Provides data for the WebPartAdding event.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

System.Object
  System.EventArgs
    System.ComponentModel.CancelEventArgs
      System.Web.UI.WebControls.WebParts.WebPartCancelEventArgs
        System.Web.UI.WebControls.WebParts.WebPartAddingEventArgs

public class WebPartAddingEventArgs : WebPartCancelEventArgs

NameDescription
System_CAPS_pubmethodWebPartAddingEventArgs(WebPart, WebPartZoneBase, Int32)

Initializes a new instance of the WebPartAddingEventArgs class.

NameDescription
System_CAPS_pubpropertyCancel

Gets or sets a value indicating whether the event should be canceled.(Inherited from CancelEventArgs.)

System_CAPS_pubpropertyWebPart

Gets the Web Parts control involved in the cancelable event.(Inherited from WebPartCancelEventArgs.)

System_CAPS_pubpropertyZone

Gets or sets the Web Parts zone that the Web Parts control is being added to.

System_CAPS_pubpropertyZoneIndex

Gets or sets the index position of a WebPart control within its zone.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The WebPartAdding event is raised by the OnWebPartAdding method just before adding a control to a Web Parts zone. This event provides an opportunity to cancel the process before it is complete. The WebPartAdded event is called after a control has been added to a Web Parts zone.

The WebPartAddingEventArgs class contains information that can be used within a WebPartAdding event. It provides access to the Web Parts control that is being added and the zone it is being added to.

.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: