I am using url.action to pass values to my controller
with the below example
onclick="location.href='@Url.Action("result", "Checking", new { id = "Name" })'">
it comes out with an error of
Unhandled exception at line 185, column 13 in http://localhost:51086/Checking/result/Name 0x80070005 - JavaScript runtime error: Access is denied.
while the program works fine with
onclick="location.href='@Url.Action("result", "Checking")?id=Name'">
Would like to know the difference of passing value using routevalue of Url.Action
Thanks
try this one
onclick="location.href='@Url.Action(\"result\", \"Checking\", new { id = \"Name\" })'">
User contributions licensed under CC BY-SA 3.0