WebBaseEvent.Raise Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Raises an event by notifying any configured provider that the event has occurred.

Namespace:   System.Web.Management
Assembly:  System.Web (in System.Web.dll)

[AspNetHostingPermissionAttribute(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Medium)]
public virtual void Raise()

If you override this method, the event raised is your custom event.


Medium trust or higher is required to raise an event.

The following code example shows how to use the Raise method.

// Raises the SampleWebBaseEvent.
public override void Raise()
    // Perform custom processing. 
    customRaisedMsg =
      string.Format("Event raised at: {0}",

    // Raise the event.

.NET Framework
Available since 2.0
Return to top