AjaxOptions Class

Represents option settings for running Ajax scripts in an ASP.NET MVC application.


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

Public Class AjaxOptions
Dim instance As AjaxOptions

The AjaxOptions type exposes the following members.

Public methodAjaxOptionsInitializes a new instance of the AjaxOptions class.

Public propertyConfirmGets or sets the message to display in a confirmation window before a request is submitted.
Public propertyHttpMethodGets or sets the HTTP request method ("Get" or "Post").
Public propertyInsertionModeGets or sets the mode that specifies how to insert the response into the target DOM element.
Public propertyLoadingElementDurationGets or sets a value, in milliseconds, that controls the duration of the animation when showing or hiding the loading element.
Public propertyLoadingElementIdGets or sets the id attribute of an HTML element that is displayed while the Ajax function is loading.
Public propertyOnBeginGets or sets the name of the JavaScript function to call immediately before the page is updated.
Public propertyOnCompleteGets or sets the JavaScript function to call when response data has been instantiated but before the page is updated.
Public propertyOnFailureGets or sets the JavaScript function to call if the page update fails.
Public propertyOnSuccessGets or sets the JavaScript function to call after the page is successfully updated.
Public propertyUpdateTargetIdGets or sets the ID of the DOM element to update by using the response from the server.
Public propertyUrlGets or sets the URL to make the request to.

Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodToUnobtrusiveHtmlAttributesReturns the Ajax options as a collection of HTML attributes to support unobtrusive JavaScript.

This class provides options for methods of the AjaxHelper and AjaxExtensions classes.

The following example shows how to use the AjaxOptions class to set the ID of the elements that are used to display the status message and to enter text.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.