BeginEventHandler Delegate

 

Represents the method that handles asynchronous events such as application events. This delegate is called at the start of an asynchronous operation.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

type BeginEventHandler = 
    delegate of 
        sender:Object *
        e:EventArgs *
        cb:AsyncCallback *
        extraData:Object -> IAsyncResult

Parameters

sender
Type: System.Object

The source of the event.

e
Type: System.EventArgs

An EventArgs that contains the event data.

cb
Type: System.AsyncCallback

The delegate to call when the asynchronous method call is complete. If cb is null, the delegate is not called.

extraData
Type: System.Object

Any additional data needed to process the request.

Return Value

Type: System.IAsyncResult

The IAsyncResult that represents the result of the BeginEventHandler operation.

When you create a BeginEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see NIB: Events and Delegates.

The following code example uses the BeginEventHandler delegate to register a handler an asynchronous page.

System_CAPS_security Security Note

This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: