在window.refresh剑道网格mvc中发送对象

本文关键字:对象 mvc 网格 window refresh | 更新日期: 2023-09-27 18:25:31

在javascript中,我想在刷新kendowindow 时发送对象

var object = {
            Number: "dfs",
            Id : 1,
            SelectedId:"dsf"
        }
var window = $("#Window").data("kendoWindow");
        window.refresh({
            url: url,
        data: {
            item: object
        }
    });

型号:

public class Weight
{
   public string Number { get; set; }
   public int Id { get; set; }
   public string SelectedId { get; set; }
}

参数为空

public ActionResult Update(Weight item)
{
}

如何正确地将对象发送到服务器?

在window.refresh剑道网格mvc中发送对象

尝试使用

window.refresh({
            data: JSON.stringify(object),
            url: url,
        });