WebBaseEvent.Raise Method ()

 

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 Overridable Sub Raise

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

System_CAPS_noteNote

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 Overrides Sub Raise()
    ' Perform custom processing. 
    customRaisedMsg = String.Format( _
    "Event raised at: {0}", DateTime.Now.TimeOfDay.ToString())

    ' Raise the event.
    MyBase.Raise()

End Sub 'Raise

.NET Framework
Available since 2.0
Return to top
Show: