AreaRegistrationContext::MapRoute Method (String, String, Object, Object, array<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.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
public: Route^ MapRoute( String^ name, String^ url, Object^ defaults, Object^ constraints, array<String^>^ namespaces )
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: array<System::String>
An enumerable set of namespaces for the application.
| Exception | Condition |
|---|---|
| ArgumentNullException | The url parameter is nullptr. |
Show: