How to send nested json object to mvc controller using ajax

后端 未结 3 1003
太阳男子
太阳男子 2020-12-22 04:20

I am working on an ASP.NET MVC application. I have the following view model in c#:

public class ContactModel
{
    public string Address { get; set; }
    pu         


        
3条回答
  •  一向
    一向 (楼主)
    2020-12-22 04:58

    If you are using @html helper for properties then form.serialize() method will bind all the properties otherwise if you are using html elements like the assign their name property same as model property.

    
    

提交回复
热议问题