weixin_33674437 2014-01-21 10:23 采纳率: 0%
浏览 34

Ajax弹出“ GET”操作

I have a form in ajax popup. I created a GET action to open popup and POST action to manage the form. The thing is that my "popup button" always goes to action POST. My "popup button" looks like this:

<button type="button" class="btn btn-primary ajax-popup {url: '@Url.Action("NewsCategoryAdd")'}"><i class="fa fa-plus"></i>Open Form</button>

What can i do to force it to invoke GET action?

  • 写回答

1条回答 默认 最新

  • weixin_33717298 2014-01-21 11:33
    关注

    For two controller methods with the same name but different request types (get/post), you can rename the HttpGet method to distinguish it from its HttpPost counterpart. This is more of a workaround than a solution but does at least remove any ambiguity when coding out the views.

    评论

报告相同问题?