【发布时间】:2011-11-16 13:26:44
【问题描述】:
从 JQGrid ,在双击时,我试图按照以下代码将用户导航到新页面
ondblClickRow : function (id) {
location.href = '<% = Url.Action("Index","MyFeature") %>/' + id;
}
我们的代码错误
得到的网址是
http://localhost:8080/MyFeature.mvc/9a1347dc-60b0-4b3b-9570-9ed100b6bc6a
在控制器之后添加索引可以解决问题,但是有没有更好的方法来做到这一点
location.href = '<% = Url.Action("Index","MyFeature") %>/Index/' + id;
http://localhost:8080/MyFeature.mvc/Index/9a1347dc-60b0-4b3b-9570-9ed100b6bc6a
【问题讨论】: