0

lets assume i have the following in my view

Html.ActionLink("ping", "X","Y");

and in the route class

routes.MapRoute(
    name: "X",
    url: "{controller}/{action}/OId/{o_id}",
    defaults: new { controller = "Home", action = "Index" }
);
routes.MapRoute(
    name: "Default",
    url: "{controller}/{action}/{id}",
    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);

the out put of the action link while i'm on this page X/Z is

/X/Y

which is correct but if the request GET Params included a variable named o_id the output is

/x/y/OId/*

while i didnt send any params to the ActionLink Method?

René Höhle
  • 26,716
  • 22
  • 73
  • 82
Hilmi
  • 3,411
  • 6
  • 27
  • 55

0 Answers0