AreaRegistrationContext.MapRoute Method

 

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

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

NameDescription
System_CAPS_pubmethodMapRoute(String, String)

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

System_CAPS_pubmethodMapRoute(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.

System_CAPS_pubmethodMapRoute(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.

System_CAPS_pubmethodMapRoute(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.

System_CAPS_pubmethodMapRoute(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.

System_CAPS_pubmethodMapRoute(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.

Return to top

AreaRegistrationContext.MapRoute Method (String, String)

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

public Route MapRoute(
	string name,
	string url
)

Parameters

name
Type: System.String

The name of the route.

url
Type: System.String

The URL pattern for the route.

Return Value

Type: System.Web.Routing.Route

A reference to the mapped route.

Exception Condition
ArgumentNullException

The url parameter is null.

Return to top

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.

public Route MapRoute(
	string name,
	string url,
	object defaults
)

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.

Return Value

Type: System.Web.Routing.Route

A reference to the mapped route.

Exception Condition
ArgumentNullException

The url parameter is null.

Return to top

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 Route MapRoute(
	string name,
	string url,
	object defaults,
	object constraints
)

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.

Return Value

Type: System.Web.Routing.Route

A reference to the mapped route.

Exception Condition
ArgumentNullException

The url parameter is null.

Return to top

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

Exception Condition
ArgumentNullException

The url parameter is null.

Return to top

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 Route MapRoute(
	string name,
	string url,
	object defaults,
	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.

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.

Exception Condition
ArgumentNullException

The url parameter is null.

Return to top

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 Route MapRoute(
	string name,
	string url,
	string[] namespaces
)

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.

Return Value

Type: System.Web.Routing.Route

A reference to the mapped route.

Exception Condition
ArgumentNullException

The url parameter is null.

Return to top
Show: