ASP.NET MVC的ActionLink和POST方法 [英] ASP.NET MVC ActionLink and post method
问题描述
谁能告诉我怎样才能提交值ActionLink的使用和POST方法来控制?
我不想使用的按钮。
我想这与jQuery的东西。
谢谢!
Can anyone tell me how can I submit values to Controller using ActionLink and POST method?
I don't want to use buttons.
I guess it has something with jquery.
Thank you!
推荐答案
您不能因为只是呈现一个锚标记使用ActionLink的。结果
您可以使用jQuery的AJAX后,请参见 http://docs.jquery.com/Ajax/jQuery.post 结果
或者只是调用窗体的submit方法有或没有JQuery的(这将是不AJAX),也许在任何控制需要你的想象onclick事件。
You can't use an ActionLink because that just renders an anchor tag.
You can use a JQuery AJAX post, see http://docs.jquery.com/Ajax/jQuery.post
or just call the form's submit method with or without JQuery (which would be non-AJAX), perhaps in the onclick event of whatever control takes your fancy.
这篇关于ASP.NET MVC的ActionLink和POST方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!