how to pass querystring in friendly url in asp.net mvc
Posted
by frosty
on Stack Overflow
See other posts from Stack Overflow
or by frosty
Published on 2010-05-10T14:28:29Z
Indexed on
2010/05/10
14:34 UTC
Read the original article
Hit count: 293
asp.net-mvc
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
);
© Stack Overflow or respective owner