ScriptComponentDescriptor.AddEvent Method (String, String)

 

Adds the specified event and handler.

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

public void AddEvent(
	string name,
	string handler
)

Parameters

name
Type: System.String

The name of the event.

handler
Type: System.String

The name of the handler function for the specified event.

Exception Condition
ArgumentException

name or handler is null or an empty string ("").

This method adds the event and handler to the internal dictionary of events that are converted to client script by the GetScript method.

.NET Framework
Available since 3.5
Return to top
Show: