title: how to get posted form data in asp.net mvc controller
body: <p>I have posted data using $.ajax method from view.I am not getting posted data in controller
  I have tried in different ways to get data but not succeeded.
  Here is my code posted</p>
  
  <pre><code>       $.ajax({
              url: "/Groupage/UpdateAddresses",
              type: "POST",
              contentType: "JSON/Application",
              data: JSON.stringify(sr)
          });
  
  
  [HttpPost]
  public void UpdateAddresses(IEnumerable&lt;GroupageAddress&gt; addresses,FormCollection coll)
   {
         //saving data in db
          var list = Request.QueryString.Cast&lt;GroupageAddress&gt;();
          var list1 = Request.QueryString.Cast&lt;IEnumerable&lt;GroupageAddress&gt;&gt;();
        //getting null for addresses parameter
       //Used request
  
   } 
  </code></pre>
  
  <p>here is groupage address class properties</p>
  
  <pre><code>   public class GroupageAddress
      {
      [Key]
      public int Id { get; set; }
      [Required]
      [Display(Name = "Transport Job Id")]
      public int GroupageJobId { get; set; }
      public int TransportJobId { get; set; }
      //Company name is not required
      [Display(Name = "Company Name")]
      public string CompanyName { get; set; }
      [Required]
      [Display(Name = "Address1")]
      public string Address1 { get; set; }
  
      [Display(Name = "Address2")]
      public string Address2 { get; set; }
      [Required]
      [Display(Name = "City")]
      public string City { get; set; }
      [Required]
      [Display(Name = "County")]
      public string County { get; set; }
      [Required]
  
      [Display(Name = "Post Code")]
      public string PostCode { get; set; }
      [Required]
      [Display(Name = "Country")]
      public int CountryId { get; set; }
  
      [Required]
      [Display(Name = "Global Transport Job Address Type Id")]
      public int GlobalTransportJobAddressTypeId { get; set; }
      [Display(Name = "Date")]
      [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
      public DateTime? Date { get; set; }
      [Display(Name = "Time From")]
  
      public DateTime? TimeFrom { get; set; }
      [Display(Name = "Time To")]
  
      public DateTime? TimeTo { get; set; }
      [Display(Name = "Actual Time")]
  
      public DateTime? ActualTime { get; set; }
  
      public int GroupageAddressSequenceId { get; set; }
  
      [Display(Name = "Is Active")]
      public bool IsActive { get; set; }
      [ScriptIgnore(ApplyToOverrides = true)]
      public virtual GroupageJob GroupageJob { get; set; }
     }
  </code></pre>
  
  <p>here is posted form data
  <img src="https://i.stack.imgur.com/hEV8a.jpg" alt="enter image description here"></p>