仅使用jQuery POST Internet Explorer时,Controller参数属性为NULL

时间:2013-03-05 09:36:42

标签: asp.net-mvc json internet-explorer jquery

我有一个MVC控制器的jQuery帖子。这个电话在Firefox& Chrome,但使用IE时对象属性为空?

任何想法可能导致这个问题的互联网资源管理器

            var orderModel =
            {
                FirstName: this.address['name_first'],
                Surname: this.address['name_last'],
                Amount: this.finalTotal,
                Line1: this.address['line1'],
                Line2: this.address['line2'],
                City: this.address['city'],
                Code: this.address['code'],
                Region: this.address['region'],
                Country: this.address['country'],
                Shipping: shippingCost,
                Phone: this.address['phone'],
                EmailAddress: this.address['email_address'],
                OrderItems: items2
            };
        var form;
        $.ajaxSetup({ 'async': false });
        $.ajaxSetup({ cache: false });
        $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: this.url,
            data: JSON.stringify(orderModel),
            dataType: "json",
            success: function(response) {
                // Process result...
            }
        });

    [HttpPost]
    public ActionResult AddPurchaseDetails(OrderModel order)
    {
        //DO Something...
     }

0 个答案:

没有答案