How can I return a JSON result to a Ajax.BeginForm

后端 未结 6 1173
独厮守ぢ
独厮守ぢ 2021-02-02 08:49

I have got this simple form:

@using (Ajax.BeginForm(\"CreateProductFromAjaxForm\",\"Product\" , 
                  null, 
                  new AjaxOptions() {           


        
6条回答
  •  一个人的身影
    2021-02-02 09:12

    Instead of:

    var getresult = function (data) {
        alert(data.result);
    };
    

    Try

    function getresult(data) {
        alert(data.result);
    };
    

提交回复
热议问题