From JQGrid , on Double Click I am trying to navigate the user to a new page as per the following code
ondblClickRow : function (id) {
location.href = '<% = Url.Action("Index","MyFeature") %>/' + id;
}
The code errors our as
the resulting url is
http://localhost:8080/MyFeature.mvc/9a1347dc-60b0-4b3b-9570-9ed100b6bc6a
Adding Index after controller does the trick but is there a better way to do this
location.href = '<% = Url.Action("Index","MyFeature") %>/Index/' + id;
http://localhost:8080/MyFeature.mvc/Index/9a1347dc-60b0-4b3b-9570-9ed100b6bc6a
You could use some placeholder that you will replace on the client: