WebBaseEvent.Raise Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應