Class AjaxExtensions
Represents support for ASP.NET AJAX within an ASP.NET MVC application.
public static class AjaxExtensions
- Inheritance
-
AjaxExtensions
- Inherited Members
Methods
ActionLink(AjaxHelper, string, string, object, AjaxOptions)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, object routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, object, AjaxOptions, object)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, string, object, AjaxOptions)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, object routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
controllerNamestringThe name of the controller.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, string, object, AjaxOptions, object)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
controllerNamestringThe name of the controller.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, string, string, string, string, object, AjaxOptions, object)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, string protocol, string hostName, string fragment, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
controllerNamestringThe name of the controller.
protocolstringThe protocol for the URL, such as "http" or "https".
hostNamestringThe host name for the URL.
fragmentstringThe URL fragment name (the anchor name).
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, string, string, string, string, RouteValueDictionary, AjaxOptions, IDictionary<string, object>)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, string protocol, string hostName, string fragment, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
controllerNamestringThe name of the controller.
protocolstringThe protocol for the URL, such as "http" or "https".
hostNamestringThe host name for the URL.
fragmentstringThe URL fragment name (the anchor name).
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, string, AjaxOptions)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
controllerNamestringThe name of the controller.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, string, RouteValueDictionary, AjaxOptions)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
controllerNamestringThe name of the controller.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, string, RouteValueDictionary, AjaxOptions, IDictionary<string, object>)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
controllerNamestringThe name of the controller.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, AjaxOptions)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, RouteValueDictionary, AjaxOptions)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
ActionLink(AjaxHelper, string, string, RouteValueDictionary, AjaxOptions, IDictionary<string, object>)
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.
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
actionNamestringThe name of the action method.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
BeginForm(AjaxHelper, string, object, AjaxOptions)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, object routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
actionNamestringThe name of the action method that will handle the request.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcForm
An opening <form> tag.
BeginForm(AjaxHelper, string, object, AjaxOptions, object)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
actionNamestringThe name of the action method that will handle the request.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcForm
An opening <form> tag.
BeginForm(AjaxHelper, string, string, object, AjaxOptions)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, string controllerName, object routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
actionNamestringThe name of the action method that will handle the request.
controllerNamestringThe name of the controller.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcForm
An opening <form> tag.
BeginForm(AjaxHelper, string, string, object, AjaxOptions, object)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, string controllerName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
actionNamestringThe name of the action method that will handle the request.
controllerNamestringThe name of the controller.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcForm
An opening <form> tag.
BeginForm(AjaxHelper, string, string, AjaxOptions)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, string controllerName, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
actionNamestringThe name of the action method that will handle the request.
controllerNamestringThe name of the controller.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcForm
An opening <form> tag.
BeginForm(AjaxHelper, string, string, RouteValueDictionary, AjaxOptions)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, string controllerName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
actionNamestringThe name of the action method that will handle the request.
controllerNamestringThe name of the controller.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcForm
An opening <form> tag.
BeginForm(AjaxHelper, string, string, RouteValueDictionary, AjaxOptions, IDictionary<string, object>)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, string controllerName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
actionNamestringThe name of the action method that will handle the request.
controllerNamestringThe name of the controller.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcForm
An opening <form> tag.
BeginForm(AjaxHelper, string, AjaxOptions)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
actionNamestringThe name of the action method that will handle the request.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcForm
An opening <form> tag.
BeginForm(AjaxHelper, string, RouteValueDictionary, AjaxOptions)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
actionNamestringThe name of the action method that will handle the request.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcForm
An opening <form> tag.
BeginForm(AjaxHelper, string, RouteValueDictionary, AjaxOptions, IDictionary<string, object>)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
actionNamestringThe name of the action method that will handle the request.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element..
Returns
- MvcForm
An opening <form> tag.
BeginForm(AjaxHelper, AjaxOptions)
Writes an opening <form> tag to the response.
public static MvcForm BeginForm(this AjaxHelper ajaxHelper, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcForm
An opening <form> tag.
BeginRouteForm(AjaxHelper, string, object, AjaxOptions)
Writes an opening <form> tag to the response using the specified routing information.
public static MvcForm BeginRouteForm(this AjaxHelper ajaxHelper, string routeName, object routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
routeNamestringThe name of the route to use to obtain the form post URL.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcForm
An opening <form> tag.
BeginRouteForm(AjaxHelper, string, object, AjaxOptions, object)
Writes an opening <form> tag to the response using the specified routing information.
public static MvcForm BeginRouteForm(this AjaxHelper ajaxHelper, string routeName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
routeNamestringThe name of the route to use to obtain the form post URL.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcForm
An opening <form> tag.
BeginRouteForm(AjaxHelper, string, AjaxOptions)
Writes an opening <form> tag to the response using the specified routing information.
public static MvcForm BeginRouteForm(this AjaxHelper ajaxHelper, string routeName, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
routeNamestringThe name of the route to use to obtain the form post URL.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcForm
An opening <form> tag.
BeginRouteForm(AjaxHelper, string, RouteValueDictionary, AjaxOptions)
Writes an opening <form> tag to the response using the specified routing information.
public static MvcForm BeginRouteForm(this AjaxHelper ajaxHelper, string routeName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
routeNamestringThe name of the route to use to obtain the form post URL.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcForm
An opening <form> tag.
BeginRouteForm(AjaxHelper, string, RouteValueDictionary, AjaxOptions, IDictionary<string, object>)
Writes an opening <form> tag to the response using the specified routing information.
public static MvcForm BeginRouteForm(this AjaxHelper ajaxHelper, string routeName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
routeNamestringThe name of the route to use to obtain the form post URL.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcForm
An opening <form> tag.
GlobalizationScript(AjaxHelper)
Returns an HTML script element that contains a reference to a globalization script that defines the culture information.
public static MvcHtmlString GlobalizationScript(this AjaxHelper ajaxHelper)
Parameters
ajaxHelperAjaxHelperThe AJAX helper object that this method extends.
Returns
- MvcHtmlString
A script element whose src attribute is set to the globalization script, as in the following example: <script type="text/javascript" src="/MvcApplication1/Scripts/Globalization/en-US.js"></script>
GlobalizationScript(AjaxHelper, CultureInfo)
Returns an HTML script element that contains a reference to a globalization script that defines the specified culture information.
public static MvcHtmlString GlobalizationScript(this AjaxHelper ajaxHelper, CultureInfo cultureInfo)
Parameters
ajaxHelperAjaxHelperThe AJAX helper object that this method extends.
cultureInfoCultureInfoEncapsulates information about the target culture, such as date formats.
Returns
- MvcHtmlString
An HTML script element whose src attribute is set to the globalization script, as in the following example:<script type="text/javascript" src="/MvcApplication1/Scripts/Globalization/en-US.js"></script>
Exceptions
- ArgumentNullException
The
cultureInfoparameter is null.
RouteLink(AjaxHelper, string, object, AjaxOptions)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, object routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, object, AjaxOptions, object)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, string, object, AjaxOptions)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, object routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeNamestringThe name of the route to use to obtain the form post URL.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, string, object, AjaxOptions, object)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeNamestringThe name of the route to use to obtain the form post URL.
routeValuesobjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, string, string, string, string, RouteValueDictionary, AjaxOptions, IDictionary<string, object>)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, string protocol, string hostName, string fragment, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeNamestringThe name of the route to use to obtain the form post URL.
protocolstringThe protocol for the URL, such as "http" or "https".
hostNamestringThe host name for the URL.
fragmentstringThe URL fragment name (the anchor name).
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, string, AjaxOptions)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeNamestringThe name of the route to use to obtain the form post URL.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, string, AjaxOptions, IDictionary<string, object>)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeNamestringThe name of the route to use to obtain the form post URL.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, string, AjaxOptions, object)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, AjaxOptions ajaxOptions, object htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeNamestringThe name of the route to use to obtain the form post URL.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesobjectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, string, RouteValueDictionary, AjaxOptions)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeNamestringThe name of the route to use to obtain the form post URL.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, string, RouteValueDictionary, AjaxOptions, IDictionary<string, object>)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeNamestringThe name of the route to use to obtain the form post URL.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, RouteValueDictionary, AjaxOptions)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, RouteValueDictionary routeValues, AjaxOptions ajaxOptions)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.
RouteLink(AjaxHelper, string, RouteValueDictionary, AjaxOptions, IDictionary<string, object>)
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.
public static MvcHtmlString RouteLink(this AjaxHelper ajaxHelper, string linkText, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes)
Parameters
ajaxHelperAjaxHelperThe AJAX helper.
linkTextstringThe inner text of the anchor element.
routeValuesRouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptionsAjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributesIDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkTextparameter is null or empty.