Export (0) Print
Expand All

UrlHelper.Action Method

.NET Framework 4

Generates a fully qualified URL to an action method.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Action(String) Generates a fully qualified URL to an action method by using the specified action name.
Public method Action(String, Object) Generates a fully qualified URL to an action method by using the specified action name and route values.
Public method Action(String, String) Generates a fully qualified URL to an action method by using the specified action name and controller name.
Public method Action(String, RouteValueDictionary) Generates a fully qualified URL to an action method for the specified action name and route values.
Public method Action(String, String, Object) Generates a fully qualified URL to an action method by using the specified action name, controller name, and route values.
Public method Action(String, String, RouteValueDictionary) Generates a fully qualified URL to an action method by using the specified action name, controller name, and route values.
Public method Action(String, String, Object, String) Generates a fully qualified URL to an action method by using the specified action name, controller name, route values, and protocol to use.
Public method Action(String, String, RouteValueDictionary, String, String) Generates a fully qualified URL for an action method by using the specified action name, controller name, route values, protocol to use, and host name.
Top

The URL that is returned by this method has a format like the following:

\Home\About

If special characters in the URL must be encoded, use the Encode method. For the previous example, the Encode method returns the following URL:

%2fHome%2fAbout

Community Additions

ADD
Show:
© 2014 Microsoft