代码 复制 - 运行

function save() {
        var imgStr = getImgStr();
        var positionObj = getPositionObj();

        if (positionObj != null) {
            var paramObj = getParamObj();
            var userObj = getUserObj();

            if (paramObj != null) {
                var obj = { "positionObj": positionObj, "paramObj": paramObj, "userObj": userObj, "imgStr": imgStr };
                $.ajax({
                    type: "post",
                    url: "/Company/Project/ProcessAdd",
                    contentType: "application/json; charset=utf-8",
                    data: JSON.stringify(obj),
                    dataType: "json",
                    success: function (message) {
                        if (message > 0) {
                            alert("请求已提交!我们会尽快与您取得联系");
                        }
                    },
                    error: function (message) {
                        alert("提交数据失败!");
                    }
                });
            }
        }
    }



后台代码

代码 复制 - 运行

public ActionResult ProcessAdd()
{

    var sr = new StreamReader(Request.InputStream);
    var str = sr.ReadToEnd();

    var json = DynamicJson.Parse(str);

    //.....处理业务

    //返回 跳转
    return null;
}



http://blog.csdn.net/u014742815/article/details/53304503