OnAjaxSettingCreating
The AjaxSettingCreating event occurs just before an AjaxSetting is added to the AjaxSettings collection of the AjaxManager.
The event can be triggered by the AjaxSettings configured at design-time as they are about to be instantiated, or at run-time in response to AddAjaxSetting(). The event can be cancelled.
The AjaxSettingCreating event handler receives two arguments:
-
The
RadAjaxManagercontrol that owns theAjaxSettingscollection to which the setting is added. This argument is of type object, but can be cast to theRadAjaxManagertype. -
An
AjaxSettingCreatingEventArgsobject with the following properties:-
Canceled—This boolean property can be set totrueto abandon creating theAjaxSettingand will prevent theOnAjaxSettingCreatedevent from firing. -
Initiator—A reference to the object that triggered the AJAX request. -
Updated—A reference to the object that will be updated by the AJAX request. -
UpdatePanel—A reference to the underlying MS AJAX UpdatePanel.
-
The following example demonstrates how to use the OnAjaxSettingCreating event.
protected void RadAjaxManager1_AjaxSettingCreating(object sender, AjaxSettingCreatingEventArgs e)
{
e.Canceled = (e.Initiator == Button1) & (e.Updated == Label1);
}