AreaRegistrationContext.MapRoute Method
Maps the specified URL route and associates it with the area that is specified by the AreaName property.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() | 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, 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, 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, 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, String()) | Maps the specified URL route and associates it with the area that is specified by the AreaName property, using the specified namespaces. |
AreaRegistrationContext.MapRoute Method (String, String)
Maps the specified URL route and associates it with the area that is specified by the AreaName property.
Parameters
- name
-
Type:
System.String
The name of the route.
- url
-
Type:
System.String
The URL pattern for the route.
| Exception | Condition |
|---|---|
| ArgumentNullException | The url parameter is null. |
AreaRegistrationContext.MapRoute Method (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.
Parameters
- name
-
Type:
System.String
The name of the route.
- url
-
Type:
System.String
The URL pattern for the route.
- defaults
-
Type:
System.Object
An object that contains default route values.
| Exception | Condition |
|---|---|
| ArgumentNullException | The url parameter is null. |
AreaRegistrationContext.MapRoute Method (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 Function MapRoute ( name As String, url As String, defaults As Object, constraints As Object ) As Route
Parameters
- name
-
Type:
System.String
The name of the route.
- url
-
Type:
System.String
The URL pattern for the route.
- defaults
-
Type:
System.Object
An object that contains default route values.
- constraints
-
Type:
System.Object
A set of expressions that specify valid values for a URL parameter.
| Exception | Condition |
|---|---|
| ArgumentNullException | The url parameter is null. |
AreaRegistrationContext.MapRoute Method (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 Function MapRoute ( name As String, url As String, defaults As Object, constraints As Object, namespaces As String() ) As Route
Parameters
- name
-
Type:
System.String
The name of the route.
- url
-
Type:
System.String
The URL pattern for the route.
- defaults
-
Type:
System.Object
An object that contains default route values.
- constraints
-
Type:
System.Object
A set of expressions that specify valid values for a URL parameter.
- namespaces
-
Type:
System.String()
An enumerable set of namespaces for the application.
| Exception | Condition |
|---|---|
| ArgumentNullException | The url parameter is null. |
AreaRegistrationContext.MapRoute Method (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 Function MapRoute ( name As String, url As String, defaults As Object, namespaces As String() ) As Route
Parameters
- name
-
Type:
System.String
The name of the route.
- url
-
Type:
System.String
The URL pattern for the route.
- defaults
-
Type:
System.Object
An object that contains default route values.
- namespaces
-
Type:
System.String()
An enumerable set of namespaces for the application.
| Exception | Condition |
|---|---|
| ArgumentNullException | The url parameter is null. |
AreaRegistrationContext.MapRoute Method (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 Function MapRoute ( name As String, url As String, namespaces As String() ) As Route
Parameters
- name
-
Type:
System.String
The name of the route.
- url
-
Type:
System.String
The URL pattern for the route.
- namespaces
-
Type:
System.String()
An enumerable set of namespaces for the application.
| Exception | Condition |
|---|---|
| ArgumentNullException | The url parameter is null. |
