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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
objectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
controllerName
stringThe name of the controller.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
controllerName
stringThe name of the controller.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
objectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
controllerName
stringThe name of the controller.
protocol
stringThe protocol for the URL, such as "http" or "https".
hostName
stringThe host name for the URL.
fragment
stringThe URL fragment name (the anchor name).
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
objectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
controllerName
stringThe name of the controller.
protocol
stringThe protocol for the URL, such as "http" or "https".
hostName
stringThe host name for the URL.
fragment
stringThe URL fragment name (the anchor name).
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
IDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
controllerName
stringThe name of the controller.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
controllerName
stringThe name of the controller.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
controllerName
stringThe name of the controller.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
IDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
actionName
stringThe name of the action method.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
IDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
actionName
stringThe name of the action method that will handle the request.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
actionName
stringThe name of the action method that will handle the request.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
objectAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
actionName
stringThe name of the action method that will handle the request.
controllerName
stringThe name of the controller.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
actionName
stringThe name of the action method that will handle the request.
controllerName
stringThe name of the controller.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
objectAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
actionName
stringThe name of the action method that will handle the request.
controllerName
stringThe name of the controller.
ajaxOptions
AjaxOptionsAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
actionName
stringThe name of the action method that will handle the request.
controllerName
stringThe name of the controller.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
actionName
stringThe name of the action method that will handle the request.
controllerName
stringThe name of the controller.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
IDictionary<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
ajaxHelper
AjaxHelperThe AJAX helper.
actionName
stringThe name of the action method that will handle the request.
ajaxOptions
AjaxOptionsAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
actionName
stringThe name of the action method that will handle the request.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
actionName
stringThe name of the action method that will handle the request.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
IDictionary<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
ajaxHelper
AjaxHelperThe AJAX helper.
ajaxOptions
AjaxOptionsAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
routeName
stringThe name of the route to use to obtain the form post URL.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
routeName
stringThe name of the route to use to obtain the form post URL.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
objectAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
routeName
stringThe name of the route to use to obtain the form post URL.
ajaxOptions
AjaxOptionsAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
routeName
stringThe name of the route to use to obtain the form post URL.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn 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
ajaxHelper
AjaxHelperThe AJAX helper.
routeName
stringThe name of the route to use to obtain the form post URL.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
IDictionary<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
ajaxHelper
AjaxHelperThe 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
ajaxHelper
AjaxHelperThe AJAX helper object that this method extends.
cultureInfo
CultureInfoEncapsulates 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
cultureInfo
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
objectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeName
stringThe name of the route to use to obtain the form post URL.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeName
stringThe name of the route to use to obtain the form post URL.
routeValues
objectAn 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.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
objectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeName
stringThe name of the route to use to obtain the form post URL.
protocol
stringThe protocol for the URL, such as "http" or "https".
hostName
stringThe host name for the URL.
fragment
stringThe URL fragment name (the anchor name).
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
IDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeName
stringThe name of the route to use to obtain the form post URL.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeName
stringThe name of the route to use to obtain the form post URL.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
IDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeName
stringThe name of the route to use to obtain the form post URL.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
objectAn object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeName
stringThe name of the route to use to obtain the form post URL.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeName
stringThe name of the route to use to obtain the form post URL.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
IDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter 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
ajaxHelper
AjaxHelperThe AJAX helper.
linkText
stringThe inner text of the anchor element.
routeValues
RouteValueDictionaryAn object that contains the parameters for a route.
ajaxOptions
AjaxOptionsAn object that provides options for the asynchronous request.
htmlAttributes
IDictionary<string, object>An object that contains the HTML attributes to set for the element.
Returns
- MvcHtmlString
An anchor element.
Exceptions
- ArgumentException
The
linkText
parameter is null or empty.