I am working on web page url routing. I want two route url with equal no. parameters, same pattern and same url but different route name. My routes are below.
Routes.MapPageRoute("Route1", "{parameter1}/{parameter2}", "packages.aspx");
Routes.MapPageRoute("Route2", "{parameter1}/{parameter2}", "destination.aspx", false, null, null,new RouteValueDictionary { { "isDestination", "yes"} });
When I call virtual path data, I am only redirecting on url that is written on top of global file.
VirtualPathData vpd =RouteTable.Routes.GetVirtualPath(null,
"Route1",
"parameter1", "parameter2");
VirtualPathData vpd =RouteTable.Routes.GetVirtualPath(null,
"Route2",
"parameter1", "parameter2");
Vpd return route for Route1. How can I construct both url for two different pages?