RouteCollection.MapPageRoute Method
Provides a way to define routes for Web Forms applications.
Assembly: System.Web (in System.Web.dll)
| Name | Description | |
|---|---|---|
![]() | MapPageRoute(String, String, String) | Provides a way to define routes for Web Forms applications. |
![]() | MapPageRoute(String, String, String, Boolean) | Provides a way to define routes for Web Forms applications. |
![]() | MapPageRoute(String, String, String, Boolean, RouteValueDictionary) | Provides a way to define routes for Web Forms applications. |
![]() | MapPageRoute(String, String, String, Boolean, RouteValueDictionary, RouteValueDictionary) | Provides a way to define routes for Web Forms applications. |
![]() | MapPageRoute(String, String, String, Boolean, RouteValueDictionary, RouteValueDictionary, RouteValueDictionary) | Provides a way to define routes for Web Forms applications. |
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 routes for a Web Forms application by using this method. The example shows a method named RegisterRoutes that is called from Application_Start in the Global.asax file. The method uses each overload of MapPageRoute to add a route to the application. For more information about how to define routes for Web Forms applications, see How to: Define Routes for Web Forms Applications.
