On the client side, if user click a button I want take user to another page. That pageis returned by a method in Controller (assuming controller is home and method is MyMethod). Wondering on the client side can I do something like following or are there any better ways of handling this?
location.href = @Url.Action("MyMethod", "Home");
You are only missing the quotes 🙂
location.href = ‘@Url.Action(“MyMethod”, “Home”)’;