I'm replacing an existing asp.net app, with an asp.net mvc app. The old app used a lot of querystring params, and I need to map those into controller actions, everytime I stick ? or & into a route i get a runtime error.
Here's what I'm trying to do.
www.myapp.com/Products/Review.aspx?prodID=1456 should be replaced by something more RESTful, but I need to maintain backwards compatibility because of SEO, bookmarks, favorites, etc.
I tried,
RouteTable.Routes.Add(new Route("Product/Reviews.aspx?productID={productID}", new MvcRouteHandler())
{
Defaults = new RouteValueDictionary(new {controller="Reviews", action = "List"}),
});
The list action takes an int called productID.