Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)
public Route MapRoute(
	string name,
	string url,
	Object defaults,
	Object constraints,
	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: System.String[]
An enumerable set of namespaces for the application.

Return Value

Type: System.Web.Routing.Route
A reference to the mapped route.
ExceptionCondition
ArgumentNullException

The url parameter is null.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.