Share via


ChildActionExtensions.Action Method

Definition

Overloads

Action(HtmlHelper, String)

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

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)

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

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)

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)

Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML 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
<Extension()>
Public Function Action (htmlHelper As HtmlHelper, actionName As String) As MvcHtmlString

Parameters

htmlHelper
HtmlHelper

The HTML helper instance that this method extends.

actionName
String

The name of the action method to invoke.

Returns

The child action result as an HTML string.

Exceptions

The htmlHelper parameter is null.

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Applies to

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
<Extension()>
Public Function Action (htmlHelper As HtmlHelper, actionName As String, routeValues As Object) As MvcHtmlString

Parameters

htmlHelper
HtmlHelper

The HTML helper instance that this method extends.

actionName
String

The name of the action method to invoke.

routeValues
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 htmlHelper parameter is null.

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Applies to

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
<Extension()>
Public Function Action (htmlHelper As HtmlHelper, actionName As String, controllerName As String) As MvcHtmlString

Parameters

htmlHelper
HtmlHelper

The HTML helper instance that this method extends.

actionName
String

The name of the action method to invoke.

controllerName
String

The name of the controller that contains the action method.

Returns

The child action result as an HTML string.

Exceptions

The htmlHelper parameter is null.

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Applies to

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
<Extension()>
Public Function Action (htmlHelper As HtmlHelper, actionName As String, routeValues As RouteValueDictionary) As MvcHtmlString

Parameters

htmlHelper
HtmlHelper

The HTML helper instance that this method extends.

actionName
String

The name of the action method to invoke.

routeValues
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 htmlHelper parameter is null.

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Applies to

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
<Extension()>
Public Function Action (htmlHelper As HtmlHelper, actionName As String, controllerName As String, routeValues As Object) As MvcHtmlString

Parameters

htmlHelper
HtmlHelper

The HTML helper instance that this method extends.

actionName
String

The name of the action method to invoke.

controllerName
String

The name of the controller that contains the action method.

routeValues
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 htmlHelper parameter is null.

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Applies to

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
<Extension()>
Public Function Action (htmlHelper As HtmlHelper, actionName As String, controllerName As String, routeValues As RouteValueDictionary) As MvcHtmlString

Parameters

htmlHelper
HtmlHelper

The HTML helper instance that this method extends.

actionName
String

The name of the action method to invoke.

controllerName
String

The name of the controller that contains the action method.

routeValues
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 htmlHelper parameter is null.

The actionName parameter is null or empty.

The required virtual path data cannot be found.

Applies to