Raise Method
Collapse the table of content
Expand the table of content

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.

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

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

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft