Route Config MVC

Saturday, May 3, 2014

I have some questions about routes. I have a route like this:


routes.MapRoute( name: "Venda", url: "{controller}/{action}/{automovelId}/{consumidorId}/{revendedoraId}", defaults: new { controller = "Venda", action = "Index", automovelId = UrlParameter.Optional, consumidorId = UrlParameter.Optional, revendedoraId = UrlParameter.Optional } );


But when I call the Edit action parameters are passed as follows:


/Venda/Edit?automovelId=1&consumidorId=1&revendedoraId=1


I want it that way:


/Venda/Edit/1/1/1


How can I do this? Thanks.







http://ift.tt/1icrLLv