how to pass querystring in friendly url in asp.net mvc
- by frosty
I have the following action. I can hit this with
/basket/address?addressId=123
However i wonder how i can hit it with
/basket/address/123
public ActionResult Address(int addressId)
{
return RedirectToAction("Index");
}
my routes
routes.MapRoute(
"Default", // Route name
"{controller}.aspx/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);