Class ChildActionExtensions
Represents support for calling child action methods and rendering the result inline in a parent view.
public static class ChildActionExtensions
- Inheritance
-
ChildActionExtensions
- Inherited Members
Methods
Action(HtmlHelper, string)
Invokes the specified child action method and returns the result as an HTML string.
public static MvcHtmlString Action(this HtmlHelper htmlHelper, string actionName)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the action method to invoke.
Returns
- MvcHtmlString
The child action result as an HTML string.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
Action(HtmlHelper, string, object)
Invokes the specified child action method with the specified parameters and returns the result as an HTML string.
public static MvcHtmlString Action(this HtmlHelper htmlHelper, string actionName, object routeValues)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the action method to invoke.
routeValuesobjectAn object that contains the parameters for a route. You can use
routeValuesto provide the parameters that are bound to the action method parameters. TherouteValuesparameter is merged with the original route values and overrides them.
Returns
- MvcHtmlString
The child action result as an HTML string.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
Action(HtmlHelper, string, string)
Invokes the specified child action method using the specified controller name and returns the result as an HTML string.
public static MvcHtmlString Action(this HtmlHelper htmlHelper, string actionName, string controllerName)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the action method to invoke.
controllerNamestringThe name of the controller that contains the action method.
Returns
- MvcHtmlString
The child action result as an HTML string.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
Action(HtmlHelper, string, string, object)
Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML string.
public static MvcHtmlString Action(this HtmlHelper htmlHelper, string actionName, string controllerName, object routeValues)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the action method to invoke.
controllerNamestringThe name of the controller that contains the action method.
routeValuesobjectAn object that contains the parameters for a route. You can use
routeValuesto provide the parameters that are bound to the action method parameters. TherouteValuesparameter is merged with the original route values and overrides them.
Returns
- MvcHtmlString
The child action result as an HTML string.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
Action(HtmlHelper, string, string, RouteValueDictionary)
Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML string.
public static MvcHtmlString Action(this HtmlHelper htmlHelper, string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the action method to invoke.
controllerNamestringThe name of the controller that contains the action method.
routeValuesRouteValueDictionaryA dictionary that contains the parameters for a route. You can use
routeValuesto provide the parameters that are bound to the action method parameters. TherouteValuesparameter is merged with the original route values and overrides them.
Returns
- MvcHtmlString
The child action result as an HTML string.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
Action(HtmlHelper, string, RouteValueDictionary)
Invokes the specified child action method using the specified parameters and returns the result as an HTML string.
public static MvcHtmlString Action(this HtmlHelper htmlHelper, string actionName, RouteValueDictionary routeValues)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the action method to invoke.
routeValuesRouteValueDictionaryA dictionary that contains the parameters for a route. You can use
routeValuesto provide the parameters that are bound to the action method parameters. TherouteValuesparameter is merged with the original route values and overrides them.
Returns
- MvcHtmlString
The child action result as an HTML string.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
RenderAction(HtmlHelper, string)
Invokes the specified child action method and renders the result inline in the parent view.
public static void RenderAction(this HtmlHelper htmlHelper, string actionName)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the child action method to invoke.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
RenderAction(HtmlHelper, string, object)
Invokes the specified child action method using the specified parameters and renders the result inline in the parent view.
public static void RenderAction(this HtmlHelper htmlHelper, string actionName, object routeValues)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the child action method to invoke.
routeValuesobjectAn object that contains the parameters for a route. You can use
routeValuesto provide the parameters that are bound to the action method parameters. TherouteValuesparameter is merged with the original route values and overrides them.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
RenderAction(HtmlHelper, string, string)
Invokes the specified child action method using the specified controller name and renders the result inline in the parent view.
public static void RenderAction(this HtmlHelper htmlHelper, string actionName, string controllerName)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the child action method to invoke.
controllerNamestringThe name of the controller that contains the action method.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
RenderAction(HtmlHelper, string, string, object)
Invokes the specified child action method using the specified parameters and controller name and renders the result inline in the parent view.
public static void RenderAction(this HtmlHelper htmlHelper, string actionName, string controllerName, object routeValues)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the child action method to invoke.
controllerNamestringThe name of the controller that contains the action method.
routeValuesobjectAn object that contains the parameters for a route. You can use
routeValuesto provide the parameters that are bound to the action method parameters. TherouteValuesparameter is merged with the original route values and overrides them.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
RenderAction(HtmlHelper, string, string, RouteValueDictionary)
Invokes the specified child action method using the specified parameters and controller name and renders the result inline in the parent view.
public static void RenderAction(this HtmlHelper htmlHelper, string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the child action method to invoke.
controllerNamestringThe name of the controller that contains the action method.
routeValuesRouteValueDictionaryA dictionary that contains the parameters for a route. You can use
routeValuesto provide the parameters that are bound to the action method parameters. TherouteValuesparameter is merged with the original route values and overrides them.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.
RenderAction(HtmlHelper, string, RouteValueDictionary)
Invokes the specified child action method using the specified parameters and renders the result inline in the parent view.
public static void RenderAction(this HtmlHelper htmlHelper, string actionName, RouteValueDictionary routeValues)
Parameters
htmlHelperHtmlHelperThe HTML helper instance that this method extends.
actionNamestringThe name of the child action method to invoke.
routeValuesRouteValueDictionaryA dictionary that contains the parameters for a route. You can use
routeValuesto provide the parameters that are bound to the action method parameters. TherouteValuesparameter is merged with the original route values and overrides them.
Exceptions
- ArgumentNullException
The
htmlHelperparameter is null.- ArgumentException
The
actionNameparameter is null or empty.- InvalidOperationException
The required virtual path data cannot be found.