Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AjaxHelper Class

 

Represents support for rendering HTML in AJAX scenarios within a view.

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


public class AjaxHelper

NameDescription
System_CAPS_pubmethodAjaxHelper(ViewContext, IViewDataContainer)

Initializes a new instance of the AjaxHelper class using the specified view context and view data container.

System_CAPS_pubmethodAjaxHelper(ViewContext, IViewDataContainer, RouteCollection)

Initializes a new instance of the AjaxHelper class by using the specified view context, view data container, and route collection.

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticGlobalizationScriptPath

Gets or sets the root path for the location to use for globalization script files.

System_CAPS_pubpropertyRouteCollection

Gets the collection of URL routes for the application.

System_CAPS_pubpropertyViewBag

Gets the ViewBag.

System_CAPS_pubpropertyViewContext

Gets the context information about the view.

System_CAPS_pubpropertyViewData

Gets the current view data dictionary.

System_CAPS_pubpropertyViewDataContainer

Gets the view data container.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodJavaScriptStringEncode(String)

Serializes the specified message and returns the resulting JSON-formatted string.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

NameDescription
System_CAPS_pubmethodActionLink(String, String, AjaxOptions)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, Object, AjaxOptions)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, Object, AjaxOptions, Object)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, RouteValueDictionary, AjaxOptions)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, RouteValueDictionary, AjaxOptions, IDictionary<String, Object>)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, AjaxOptions)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, Object, AjaxOptions)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, Object, AjaxOptions, Object)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, RouteValueDictionary, AjaxOptions)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, RouteValueDictionary, AjaxOptions, IDictionary<String, Object>)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, String, String, String, Object, AjaxOptions, Object)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodActionLink(String, String, String, String, String, String, RouteValueDictionary, AjaxOptions, IDictionary<String, Object>)

Overloaded. Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(AjaxOptions)

Overloaded. Writes an opening <form> tag to the response.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(String, AjaxOptions)

Overloaded. Writes an opening <form> tag to the response.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(String, Object, AjaxOptions)

Overloaded. Writes an opening <form> tag to the response.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(String, Object, AjaxOptions, Object)

Overloaded. Writes an opening <form> tag to the response.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(String, RouteValueDictionary, AjaxOptions)

Overloaded. Writes an opening <form> tag to the response.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(String, RouteValueDictionary, AjaxOptions, IDictionary<String, Object>)

Overloaded. Writes an opening <form> tag to the response. (Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(String, String, AjaxOptions)

Overloaded. Writes an opening <form> tag to the response.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(String, String, Object, AjaxOptions)

Overloaded. Writes an opening <form> tag to the response.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(String, String, Object, AjaxOptions, Object)

Overloaded. Writes an opening <form> tag to the response.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(String, String, RouteValueDictionary, AjaxOptions)

Overloaded. Writes an opening <form> tag to the response.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginForm(String, String, RouteValueDictionary, AjaxOptions, IDictionary<String, Object>)

Overloaded. Writes an opening <form> tag to the response.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginRouteForm(String, AjaxOptions)

Overloaded. Writes an opening <form> tag to the response using the specified routing information.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginRouteForm(String, Object, AjaxOptions)

Overloaded. Writes an opening <form> tag to the response using the specified routing information.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginRouteForm(String, Object, AjaxOptions, Object)

Overloaded. Writes an opening <form> tag to the response using the specified routing information.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginRouteForm(String, RouteValueDictionary, AjaxOptions)

Overloaded. Writes an opening <form> tag to the response using the specified routing information.(Defined by AjaxExtensions.)

System_CAPS_pubmethodBeginRouteForm(String, RouteValueDictionary, AjaxOptions, IDictionary<String, Object>)

Overloaded. Writes an opening <form> tag to the response using the specified routing information.(Defined by AjaxExtensions.)

System_CAPS_pubmethodGlobalizationScript()

Overloaded. Returns an HTML script element that contains a reference to a globalization script that defines the culture information.(Defined by AjaxExtensions.)

System_CAPS_pubmethodGlobalizationScript(CultureInfo)

Overloaded. Returns an HTML script element that contains a reference to a globalization script that defines the specified culture information.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, Object, AjaxOptions)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, Object, AjaxOptions, Object)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, RouteValueDictionary, AjaxOptions)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, RouteValueDictionary, AjaxOptions, IDictionary<String, Object>)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, String, AjaxOptions)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, String, AjaxOptions, IDictionary<String, Object>)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, String, AjaxOptions, Object)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, String, Object, AjaxOptions)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, String, Object, AjaxOptions, Object)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, String, RouteValueDictionary, AjaxOptions)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, String, RouteValueDictionary, AjaxOptions, IDictionary<String, Object>)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

System_CAPS_pubmethodRouteLink(String, String, String, String, String, RouteValueDictionary, AjaxOptions, IDictionary<String, Object>)

Overloaded. Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript.(Defined by AjaxExtensions.)

The AjaxHelper class includes methods that provide client-side functionality in ASP.NET AJAX in MVC applications, such as creating asynchronous forms and rendering links. The AjaxHelper class supports asynchronous partial-page updates. Extensions to the AjaxHelper class are in the System.Web.Mvc.Ajax namespace.

Helper methods and extensions are called using the Ajax property of the view, which is an instance of the AjaxHelper class. For example, to generate a link to a controller action method, you can call the ActionLink method in your view using the following syntax:

<%= Ajax.ActionLink("ActionName") %>

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

Return to top
Show:
© 2016 Microsoft