Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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 virtual void Raise()

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

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 override void Raise()
{
    // Perform custom processing. 
    customRaisedMsg =
      string.Format("Event raised at: {0}",
      EventTime.ToString());

    // Raise the event. 
    base.Raise();
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft