![](/img/trans.png)
[英]How to pass specific data from webgrid into MVC Controller using Javascript?
[英]How to pass values from webgrid using javascript to another action page?
我在MVC3中有一个Webgrid,它有一个编辑列。 单击列时,必须将行的ID传递到另一个操作页面 ,在该页面中我已编写了edit动作。 单击Webgrid中的编辑列时如何运行Javascript函数?
在您的视图中使用它作为您的编辑链接:
Html.ActionLink(article.Title,
"Item", // <-- ActionMethod
"Login", // <-- Controller Name.
new { ItemID = Model.ItemID }, // <-- Route arguments.
null // <-- htmlArguments .. which are none. You need this value
// otherwise you call the WRONG method ...
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.