WebBaseEvent.Raise Method

Definition

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

Overloads

Raise()

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

Raise(WebBaseEvent)

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

Raise()

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

public:
 virtual void Raise();
public virtual void Raise ();
abstract member Raise : unit -> unit
override this.Raise : unit -> unit
Public Overridable Sub Raise ()

Examples

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();
}
' 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

Remarks

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

Note

Medium trust or higher is required to raise an event.

See also

Applies to

Raise(WebBaseEvent)

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

public:
 static void Raise(System::Web::Management::WebBaseEvent ^ eventRaised);
public static void Raise (System.Web.Management.WebBaseEvent eventRaised);
static member Raise : System.Web.Management.WebBaseEvent -> unit
Public Shared Sub Raise (eventRaised As WebBaseEvent)

Parameters

eventRaised
WebBaseEvent

A WebBaseEvent object.

Exceptions

The EventCode property of eventRaised has a value that is reserved for ASP.NET.

Examples

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


// Raises the SampleWebBaseEvent.
public void CustomRaise(
    System.Web.Management.WebBaseEvent evnt)
{
    
    // Raise the event.
    Raise(evnt);
}
' Raises the SampleWebBaseEvent.
Public Sub CustomRaise(ByVal evnt _
As System.Web.Management.WebBaseEvent)

    ' Raise the event.
    Raise(evnt)

End Sub

Remarks

This method raises the specified event by notifying any configured provider that the event has occurred.

Note

Medium trust or higher is required to raise an event.

See also

Applies to