The AjaxOptions class defines properties that allow you to specify callbacks for different stages in the AJAX request life cycle. There are following properties provided by AjaxOptions class for AJAX helpers:
Property | Description |
---|---|
Url | Specify the URL that will be requested from the server. |
Confirm | Specify a message that will be displayed in a confirm dialog to the end user. When user clicks on OK button in the confirmation dialog, the Ajax call performs. |
OnBegin | Specify a JavaScript function name which is called at the beginning of the Ajax request. |
OnComplete | Specify a JavaScript function name which is called at the end of the Ajax request. |
OnSuccess | Specify a JavaScript function name which is called when the Ajax request is successful. |
OnFailure | Specify a JavaScript function name which is called if the Ajax request fails. |
LoadingElementId | Specify progress message container’s Id to display a progress message or animation to the end user while an Ajax request is being made. |
LoadingElementDuration | Specify a time duration in milliseconds that controls the duration of the progress message or animation. |
UpdateTargetId | Specify the target container’s Id that will be populated with the HTML returned by the action method. |
InsertionMode | Specify the way of populating the target container. The possible values are InsertAfter, InsertBefore and Replace (which is the default). |