I have the following RouteLink:
@Html.RouteLink("Accept Offer", new { controller = "Case", action = "Accept", id = item.CaseId, offerid = item.PxOfferId }, new { @class = "btn btn-success" })
Which formats the URL as:
http://localhost:54644/Clients/Case/Accept/15847?offerid=3103
How do I format the URL to be:
http://localhost:54644/Clients/Case/Accept/15847/3103
Thanks.
Default route:
context.MapRoute(
"Clients_default",
"Clients/{controller}/{action}/{id}",
new { controller = "Login", action = "Index", id = UrlParameter.Optional }
);
Route works if I put this first in my defined routes:
context.MapRoute(
name: "Accept Offer",
url: "Clients/{controller}/{action}/{id}/{offerid}",
defaults: new { controller = "Case", action = "Accept", id = 0, offerid = UrlParameter.Optional }
);
but then causes errors on other pages.
offeridofferIdon route configuration like this:{controller}/{action}/{id}/{offerid}and declareofferidasUrlParameter.Optional.RouteConfig? If you don't have one set up you'll need to do that. Then you will be able to achieve the url format your require