Click or drag to resize

EAPCtrlUtilsAddEventHandler Method (WebControl, String, String, Boolean, Boolean)

Add a new javascript event handler (e.g. onclick) to a control without overwriting any existing handler.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static void AddEventHandler(
	WebControl ctrl,
	string evt,
	string js,
	bool append,
	bool dupeCheck
)

Parameters

ctrl
Type: System.Web.UI.WebControlsWebControl
The control to which to add the handler.
evt
Type: SystemString
The event to handle, e.g. "onclick".
js
Type: SystemString
The javascript to add.
append
Type: SystemBoolean
True if the javascript should be appended to whatever script is already present, else to prepend the new javascript.
dupeCheck
Type: SystemBoolean
If true, javascript will not be added if the clause is already present.
See Also