Hi,
I have id = “country\city”
I'm using below ActionLink in a table:
@Html.ActionLink("change", "changeCity", new { id = item.myCountyCity })
but because my id has 2 sections separated by backslash every time I click on the link it gives me error. To resolve the problem I wrote this custom route:
routes.MapRoute(
"CityCountyRoute",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", county = "", id = "" });
Still this route is not working and I’m still receiving same error.
Thank you for your help in advance
Geeta
I have id = “country\city”
I'm using below ActionLink in a table:
@Html.ActionLink("change", "changeCity", new { id = item.myCountyCity })
but because my id has 2 sections separated by backslash every time I click on the link it gives me error. To resolve the problem I wrote this custom route:
routes.MapRoute(
"CityCountyRoute",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", county = "", id = "" });
Still this route is not working and I’m still receiving same error.
Thank you for your help in advance
Geeta