UrlHelper.RouteUrl UrlHelper.RouteUrl UrlHelper.RouteUrl Method

Definition

Overloads

RouteUrl(Object) RouteUrl(Object) RouteUrl(Object)

Generates a fully qualified URL for the specified route values.

RouteUrl(String) RouteUrl(String) RouteUrl(String)

Generates a fully qualified URL for the specified route name.

RouteUrl(RouteValueDictionary) RouteUrl(RouteValueDictionary) RouteUrl(RouteValueDictionary)

Generates a fully qualified URL for the specified route values.

RouteUrl(String, Object) RouteUrl(String, Object) RouteUrl(String, Object)

Generates a fully qualified URL for the specified route values by using a route name.

RouteUrl(String, RouteValueDictionary) RouteUrl(String, RouteValueDictionary) RouteUrl(String, RouteValueDictionary)

Generates a fully qualified URL for the specified route values by using a route name.

RouteUrl(String, Object, String) RouteUrl(String, Object, String) 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, String, String) RouteUrl(String, RouteValueDictionary, String, String) 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.

RouteUrl(Object) RouteUrl(Object) RouteUrl(Object)

Generates a fully qualified URL for the specified route values.

public virtual string RouteUrl (object routeValues);
abstract member RouteUrl : obj -> string
override this.RouteUrl : obj -> string
Public Overridable Function RouteUrl (routeValues As Object) As String

Parameters

routeValues
Object Object 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.

Returns

The fully qualified URL.

RouteUrl(String) RouteUrl(String) RouteUrl(String)

Generates a fully qualified URL for the specified route name.

public virtual string RouteUrl (string routeName);
abstract member RouteUrl : string -> string
override this.RouteUrl : string -> string
Public Overridable Function RouteUrl (routeName As String) As String

Parameters

routeName
String String String

The name of the route that is used to generate URL.

Returns

The fully qualified URL.

RouteUrl(RouteValueDictionary) RouteUrl(RouteValueDictionary) RouteUrl(RouteValueDictionary)

Generates a fully qualified URL for the specified route values.

public virtual string RouteUrl (System.Web.Routing.RouteValueDictionary routeValues);
abstract member RouteUrl : System.Web.Routing.RouteValueDictionary -> string
override this.RouteUrl : System.Web.Routing.RouteValueDictionary -> string
Public Overridable Function RouteUrl (routeValues As RouteValueDictionary) As String

Parameters

routeValues
RouteValueDictionary RouteValueDictionary RouteValueDictionary

An object that contains the parameters for a route.

Returns

The fully qualified URL.

RouteUrl(String, Object) RouteUrl(String, Object) RouteUrl(String, Object)

Generates a fully qualified URL for the specified route values by using a route name.

public virtual string RouteUrl (string routeName, object routeValues);
abstract member RouteUrl : string * obj -> string
override this.RouteUrl : string * obj -> string
Public Overridable Function RouteUrl (routeName As String, routeValues As Object) As String

Parameters

routeName
String String String

The name of the route that is used to generate URL.

routeValues
Object Object 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.

Returns

The fully qualified URL.

RouteUrl(String, RouteValueDictionary) RouteUrl(String, RouteValueDictionary) RouteUrl(String, RouteValueDictionary)

Generates a fully qualified URL for the specified route values by using a route name.

public virtual string RouteUrl (string routeName, System.Web.Routing.RouteValueDictionary routeValues);
abstract member RouteUrl : string * System.Web.Routing.RouteValueDictionary -> string
override this.RouteUrl : string * System.Web.Routing.RouteValueDictionary -> string
Public Overridable Function RouteUrl (routeName As String, routeValues As RouteValueDictionary) As String

Parameters

routeName
String String String

The name of the route that is used to generate URL.

routeValues
RouteValueDictionary RouteValueDictionary RouteValueDictionary

An object that contains the parameters for a route.

Returns

The fully qualified URL.

RouteUrl(String, Object, String) RouteUrl(String, Object, String) 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 virtual string RouteUrl (string routeName, object routeValues, string protocol);
abstract member RouteUrl : string * obj * string -> string
override this.RouteUrl : string * obj * string -> string
Public Overridable Function RouteUrl (routeName As String, routeValues As Object, protocol As String) As String

Parameters

routeName
String String String

The name of the route that is used to generate the URL.

routeValues
Object Object 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
String String String

The protocol for the URL, such as "http" or "https".

Returns

The fully qualified URL.

RouteUrl(String, RouteValueDictionary, String, String) RouteUrl(String, RouteValueDictionary, String, String) 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.

public virtual string RouteUrl (string routeName, System.Web.Routing.RouteValueDictionary routeValues, string protocol, string hostName);
abstract member RouteUrl : string * System.Web.Routing.RouteValueDictionary * string * string -> string
override this.RouteUrl : string * System.Web.Routing.RouteValueDictionary * string * string -> string
Public Overridable Function RouteUrl (routeName As String, routeValues As RouteValueDictionary, protocol As String, hostName As String) As String

Parameters

routeName
String String String

The name of the route that is used to generate URL.

routeValues
RouteValueDictionary RouteValueDictionary RouteValueDictionary

An object that contains the parameters for a route.

protocol
String String String

The protocol for the URL, such as "http" or "https".

hostName
String String String

The host name for the URL.

Returns

The fully qualified URL.

Applies to