What is the difference between Routes.Add and MapRoute?
1 answer
MapRoute is just a wrapper around the more generalized Route.Add () This is an extension method, to be precise.
Routing is not MVC and therefore allows you to provide any suitable route. This makes it extremely flexible and allows you to implement your own custom RouteHandlers. I did it again in ASP.Net 3.5 for .aspx pages.
It looks something like this:
routes.Add("Blah",
Route("custom/{stuff}", new SecretSauceRouteHandler()))
+8
source to share