This topic has not yet been rated - Rate this topic

UrlHelper.Action Method

Generates a fully qualified URL to an action method.

  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 the 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 returned by this method will be similar to "\Home\About". If you need the URL encoded, use the Encode method, which would return "%2fHome%2fAbout" given the foregoing URL.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ