How to use Ajax.BeginForm MVC helper with JSON result?

前端 未结 5 1969
清歌不尽
清歌不尽 2020-11-30 02:17

I\'m trying to use the ASP.NET MVC Ajax.BeginForm helper but don\'t want to use the existing content insertion options when the call completes. Instead, I want to use a cust

5条回答
  •  -上瘾入骨i
    2020-11-30 02:39

    I use:

        function onTestComplete(data, status, xhr) {
           var data2 = JSON.parse(data.responseText);
           //data2 is your object
        }
    

提交回复
热议问题