RouteCollection.Add Method (String, RouteBase)
Adds a route to the end of the RouteCollection object and assigns the specified name to the route.
Assembly: System.Web (in System.Web.dll)
The GetVirtualPath method. If you do not specify a named route, ASP.NET routing will use the first route in the collection that matches the values. For more information, see How to: Construct URLs from Routes.method enables you to define a name for a route when you add it to the route collection. By defining a name for the route, you can specify a particular route to use when you use routing to construct a URL. Specifying a particular route is important when more than one route matches the values that you pass to the
A name can be used only one time in the RouteCollection object.
If you do not have to specify a name for the route, you can add the route by calling the Add method.
Available since 3.5