UrlHelper.RouteUrl Method
Generates a fully qualified URL.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() | RouteUrl(Object) | Generates a fully qualified URL for the specified route values. |
![]() | RouteUrl(RouteValueDictionary) | Generates a fully qualified URL for the specified route values. |
![]() | RouteUrl(String) | Generates a fully qualified URL for the specified route name. |
![]() | RouteUrl(String, Object) | Generates a fully qualified URL for the specified route values by using a route name. |
![]() | RouteUrl(String, Object, String) | Generates a fully qualified URL for the specified route values by using a route name and the protocol to use. |
![]() | RouteUrl(String, RouteValueDictionary) | Generates a fully qualified URL for the specified route values by using a route name. |
![]() | 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. |
UrlHelper.RouteUrl Method (Object)
Generates a fully qualified URL for the specified route values.
Parameters
- routeValues
-
Type:
System.Object
An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax.
UrlHelper.RouteUrl Method (RouteValueDictionary)
Generates a fully qualified URL for the specified route values.
Parameters
- routeValues
-
Type:
System.Web.Routing.RouteValueDictionary
An object that contains the parameters for a route.
UrlHelper.RouteUrl Method (String)
Generates a fully qualified URL for the specified route name.
Parameters
- routeName
-
Type:
System.String
The name of the route that is used to generate URL.
UrlHelper.RouteUrl Method (String, Object)
Generates a fully qualified URL for the specified route values by using a route name.
Public Overridable Function RouteUrl ( routeName As String, routeValues As Object ) As String
Parameters
- routeName
-
Type:
System.String
The name of the route that is used to generate URL.
- routeValues
-
Type:
System.Object
An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax.
UrlHelper.RouteUrl Method (String, Object, String)
Generates a fully qualified URL for the specified route values by using a route name and the protocol to use.
Public Overridable Function RouteUrl ( routeName As String, routeValues As Object, protocol As String ) As String
Parameters
- routeName
-
Type:
System.String
The name of the route that is used to generate the URL.
- routeValues
-
Type:
System.Object
An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax.
- protocol
-
Type:
System.String
The protocol for the URL, such as "http" or "https".
UrlHelper.RouteUrl Method (String, RouteValueDictionary)
Generates a fully qualified URL for the specified route values by using a route name.
Public Overridable Function RouteUrl ( routeName As String, routeValues As RouteValueDictionary ) As String
Parameters
- routeName
-
Type:
System.String
The name of the route that is used to generate URL.
- routeValues
-
Type:
System.Web.Routing.RouteValueDictionary
An object that contains the parameters for a route.
UrlHelper.RouteUrl Method (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.
Public Overridable Function RouteUrl ( routeName As String, routeValues As RouteValueDictionary, protocol As String, hostName As String ) As String
Parameters
- routeName
-
Type:
System.String
The name of the route that is used to generate URL.
- routeValues
-
Type:
System.Web.Routing.RouteValueDictionary
An object that contains the parameters for a route.
- protocol
-
Type:
System.String
The protocol for the URL, such as "http" or "https".
- hostName
-
Type:
System.String
The host name for the URL.
