1

我有以下控制器

[HttpPost]
public JsonResult Update(List<DeliveryNoteDisplay> DeliveryNotes, UserSession userSession)
{
// etc
}

这会正确地传递所有值,唯一的例外是 id 值始终为 null,即使我可以通过 fire bug 看到它。

在此处输入图像描述

public class DeliveryNoteDisplay
{
    public virtual string Id { get; set; }
    public virtual string ProjectId { get; set; }
    public virtual string DeliveryNoteId { get; set; }
    public virtual string ClientId { get; set; }
    public virtual string VehicleId { get; set; }
    public virtual string CourierId { get; set; }
    public virtual string JobIds { get; set; }
    public virtual string Name { get; set; }
    public virtual string DeliveryTo { get; set; }
    public virtual string DeliveryFrom { get; set; }
    public virtual string Estimated { get; set; }
    public virtual string Actual { get; set; }
    public virtual string BookedDate { get; set; }
    public virtual string CreatedByUserName { get; set; }
    public virtual string Modified { get; set; }
    public virtual string Created { get; set; }
    public virtual bool ShowAddressFooter { get; set; }
    public virtual bool ShowDeliveryFrom { get; set; }
    public virtual bool ShowHeaderLogo { get; set; }
}
4

1 回答 1

2

在帖子中,json 以带有值的 Id 开头,并再次以 id 结尾......它是空的。

于 2012-04-26T09:26:24.867 回答