Ajax Form Redirect the page from inside Jquery Dialog

后端 未结 4 1647
轮回少年
轮回少年 2021-01-26 07:45

i have a jquery Dialog in a partial view:

@model JQueryDialogPoc.Models.FeedBack
@using (Ajax.BeginForm(\"GiveFeedback\", \"Home\", null, new AjaxOptions { HttpM         


        
4条回答
  •  抹茶落季
    2021-01-26 08:45

    I suspect the problem is with the UpdateTargetId parameter to the AjaxBeginForm method. I recommend against using the helper and simply adding code to intercept the form submit and post the form via Ajax manually.

    The AjaxBeginForm helper is meant to update a chunk of content on a page with the results of a form post, to handle json results refer to this question: How to use Ajax.BeginForm MVC helper with JSON result?

提交回复
热议问题