Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RouteCollection::MapPageRoute Method (String^, String^, String^)

.NET Framework (current version)
 

Provides a way to define routes for Web Forms applications.

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

public:
Route^ MapPageRoute(
	String^ routeName,
	String^ routeUrl,
	String^ physicalFile
)

Parameters

routeName
Type: System::String^

The name of the route.

routeUrl
Type: System::String^

The URL pattern for the route.

physicalFile
Type: System::String^

The physical URL for the route.

Return Value

Type: System.Web.Routing::Route^

The route that is added to the route collection.

This method is provided for coding convenience. It is equivalent to calling the Add method and passing a Route object that is created by using the PageRouteHandler class.

The following example shows how to define a route by using this method. The first statement defines a route that does not have a name. The second statement defines a named route. This example is part of a larger example that is available in the MapPageRoute method overview.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 4.0
Return to top
Show:
© 2017 Microsoft