Export (0) Print
Expand All

UrlHelper.RouteUrl Method

Generates a fully qualified URL.

  NameDescription
Public method RouteUrl(Object) Generates a fully qualified URL for the specified route values.
Public method RouteUrl(String) Generates a fully qualified URL for the specified route name.
Public method RouteUrl(RouteValueDictionary) Generates a fully qualified URL for the specified route values.
Public method RouteUrl(String, Object) Generates a fully qualified URL for the specified route values by using a route name.
Public method RouteUrl(String, RouteValueDictionary) Generates a fully qualified URL for the specified route values by using a route name.
Public method RouteUrl(String, Object, String) Generates a fully qualified URL for the specified route values by using a route name and the protocol to use.
Public method RouteUrl(String, RouteValueDictionary, String, String) Generates a fully qualified URL for the specified route values by using the specified route name, 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.

Community Additions

Show:
© 2014 Microsoft