ChildActionExtensions.Action ChildActionExtensions.Action Method

Definition

Overloads

Action(HtmlHelper, String) Action(HtmlHelper, String)

Invokes the specified child action method and returns the result as an HTML string.

Action(HtmlHelper, String, Object) Action(HtmlHelper, String, Object)

Invokes the specified child action method with the specified parameters and returns the result as an HTML string.

Action(HtmlHelper, String, String) Action(HtmlHelper, String, String)

Invokes the specified child action method using the specified controller name and returns the result as an HTML string.

Action(HtmlHelper, String, RouteValueDictionary) Action(HtmlHelper, String, RouteValueDictionary)

Invokes the specified child action method using the specified parameters and returns the result as an HTML string.

Action(HtmlHelper, String, String, Object) 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.

Action(HtmlHelper, String, String, RouteValueDictionary) 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.

Action(HtmlHelper, String) Action(HtmlHelper, String)

Invokes the specified child action method and returns the result as an HTML string.

public static System.Web.Mvc.MvcHtmlString Action (this System.Web.Mvc.HtmlHelper htmlHelper, string actionName);
static member Action : System.Web.Mvc.HtmlHelper * string -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

actionName
String String

The name of the action method to invoke.

Returns

The child action result as an HTML string.

Exceptions

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Action(HtmlHelper, String, Object) Action(HtmlHelper, String, Object)

Invokes the specified child action method with the specified parameters and returns the result as an HTML string.

public static System.Web.Mvc.MvcHtmlString Action (this System.Web.Mvc.HtmlHelper htmlHelper, string actionName, object routeValues);
static member Action : System.Web.Mvc.HtmlHelper * string * obj -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

actionName
String String

The name of the action method to invoke.

routeValues
Object Object

An object that contains the parameters for a route. You can use routeValues to provide the parameters that are bound to the action method parameters. The routeValues parameter is merged with the original route values and overrides them.

Returns

The child action result as an HTML string.

Exceptions

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Action(HtmlHelper, String, String) 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 System.Web.Mvc.MvcHtmlString Action (this System.Web.Mvc.HtmlHelper htmlHelper, string actionName, string controllerName);
static member Action : System.Web.Mvc.HtmlHelper * string * string -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

actionName
String String

The name of the action method to invoke.

controllerName
String String

The name of the controller that contains the action method.

Returns

The child action result as an HTML string.

Exceptions

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Action(HtmlHelper, String, RouteValueDictionary) Action(HtmlHelper, String, RouteValueDictionary)

Invokes the specified child action method using the specified parameters and returns the result as an HTML string.

public static System.Web.Mvc.MvcHtmlString Action (this System.Web.Mvc.HtmlHelper htmlHelper, string actionName, System.Web.Routing.RouteValueDictionary routeValues);
static member Action : System.Web.Mvc.HtmlHelper * string * System.Web.Routing.RouteValueDictionary -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

actionName
String String

The name of the action method to invoke.

routeValues
RouteValueDictionary RouteValueDictionary

A dictionary that contains the parameters for a route. You can use routeValues to provide the parameters that are bound to the action method parameters. The routeValues parameter is merged with the original route values and overrides them.

Returns

The child action result as an HTML string.

Exceptions

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Action(HtmlHelper, String, String, Object) 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 System.Web.Mvc.MvcHtmlString Action (this System.Web.Mvc.HtmlHelper htmlHelper, string actionName, string controllerName, object routeValues);
static member Action : System.Web.Mvc.HtmlHelper * string * string * obj -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

actionName
String String

The name of the action method to invoke.

controllerName
String String

The name of the controller that contains the action method.

routeValues
Object Object

An object that contains the parameters for a route. You can use routeValues to provide the parameters that are bound to the action method parameters. The routeValues parameter is merged with the original route values and overrides them.

Returns

The child action result as an HTML string.

Exceptions

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Action(HtmlHelper, String, String, RouteValueDictionary) 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 System.Web.Mvc.MvcHtmlString Action (this System.Web.Mvc.HtmlHelper htmlHelper, string actionName, string controllerName, System.Web.Routing.RouteValueDictionary routeValues);
static member Action : System.Web.Mvc.HtmlHelper * string * string * System.Web.Routing.RouteValueDictionary -> System.Web.Mvc.MvcHtmlString

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

actionName
String String

The name of the action method to invoke.

controllerName
String String

The name of the controller that contains the action method.

routeValues
RouteValueDictionary RouteValueDictionary

A dictionary that contains the parameters for a route. You can use routeValues to provide the parameters that are bound to the action method parameters. The routeValues parameter is merged with the original route values and overrides them.

Returns

The child action result as an HTML string.

Exceptions

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Applies to