I'm trying to create a custom routing. Here is what I've tried but does not work, what am I doign wrong?
Expected Call:
MyWebsite/Friend/Respond/55/4
routes.MapRoute(
name : "Friend",
url : "Friend/Respond/{id}/{state}"
);
// This method is in a Controller Named FriendController
[HttpPost]
public ActionResult Respond(int id, int state)
{
// Do stuff
}
ANSWER:
routes.MapRoute(
name : "ExtraParameter",
url : "{controller}/{action}/{id}/{state}",
defaults : new { }
);