AreaRegistrationContext.MapRoute Method

Definition

Overloads

MapRoute(String, String)

Maps the specified URL route and associates it with the area that is specified by the AreaName property.

MapRoute(String, String, Object)

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values.

MapRoute(String, String, String[])

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified namespaces.

MapRoute(String, String, Object, Object)

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values and constraint.

MapRoute(String, String, Object, String[])

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values and namespaces.

MapRoute(String, String, Object, Object, String[])

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values, constraints, and namespaces.

MapRoute(String, String)

Maps the specified URL route and associates it with the area that is specified by the AreaName property.

public System.Web.Routing.Route MapRoute (string name, string url);
member this.MapRoute : string * string -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String) As Route

Parameters

name
String

The name of the route.

url
String

The URL pattern for the route.

Returns

A reference to the mapped route.

Exceptions

The url parameter is null.

Applies to

MapRoute(String, String, Object)

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values.

public System.Web.Routing.Route MapRoute (string name, string url, object defaults);
member this.MapRoute : string * string * obj -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String, defaults As Object) As Route

Parameters

name
String

The name of the route.

url
String

The URL pattern for the route.

defaults
Object

An object that contains default route values.

Returns

A reference to the mapped route.

Exceptions

The url parameter is null.

Applies to

MapRoute(String, String, String[])

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified namespaces.

public System.Web.Routing.Route MapRoute (string name, string url, string[] namespaces);
member this.MapRoute : string * string * string[] -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String, namespaces As String()) As Route

Parameters

name
String

The name of the route.

url
String

The URL pattern for the route.

namespaces
String[]

An enumerable set of namespaces for the application.

Returns

A reference to the mapped route.

Exceptions

The url parameter is null.

Applies to

MapRoute(String, String, Object, Object)

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values and constraint.

public System.Web.Routing.Route MapRoute (string name, string url, object defaults, object constraints);
member this.MapRoute : string * string * obj * obj -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String, defaults As Object, constraints As Object) As Route

Parameters

name
String

The name of the route.

url
String

The URL pattern for the route.

defaults
Object

An object that contains default route values.

constraints
Object

A set of expressions that specify valid values for a URL parameter.

Returns

A reference to the mapped route.

Exceptions

The url parameter is null.

Applies to

MapRoute(String, String, Object, String[])

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values and namespaces.

public System.Web.Routing.Route MapRoute (string name, string url, object defaults, string[] namespaces);
member this.MapRoute : string * string * obj * string[] -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String, defaults As Object, namespaces As String()) As Route

Parameters

name
String

The name of the route.

url
String

The URL pattern for the route.

defaults
Object

An object that contains default route values.

namespaces
String[]

An enumerable set of namespaces for the application.

Returns

A reference to the mapped route.

Exceptions

The url parameter is null.

Applies to

MapRoute(String, String, Object, Object, String[])

Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified route default values, constraints, and namespaces.

public System.Web.Routing.Route MapRoute (string name, string url, object defaults, object constraints, string[] namespaces);
member this.MapRoute : string * string * obj * obj * string[] -> System.Web.Routing.Route
Public Function MapRoute (name As String, url As String, defaults As Object, constraints As Object, namespaces As String()) As Route

Parameters

name
String

The name of the route.

url
String

The URL pattern for the route.

defaults
Object

An object that contains default route values.

constraints
Object

A set of expressions that specify valid values for a URL parameter.

namespaces
String[]

An enumerable set of namespaces for the application.

Returns

A reference to the mapped route.

Exceptions

The url parameter is null.

Applies to