title: How to pass datetime from view to controller in asp.net MVC
body: <p>Am trying to pass below data form my view to controller.</p>
  
  <p><strong>Edited</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var pathname = 'http://' + window.location.host;
    var Student = [
    { Name: "Vijay", ID: 1, DOB: "2010-12-09T08:00:00.000Z" },
    { Name: "Anand", ID: 2, DOB: "2010-12-09T08:00:00.000Z" }
    ];
  
    $.ajax({
      url: pathname + "/Home/UpadetStu",
      type: "POST",
      dataType: "json",
      data: JSON.stringify(Student),
      contentType: "application/json; charset=utf-8",
      success: function (result) { }, 
      failure: function (r, e, s) { alert(e); } 
    });
  
  &lt;/script&gt;
  
  
  
     [ObjectFilter(Param = "stuData", RootType = typeof(Stu[]))]
      public JsonResult UpadetStu(Stu[] stuData)
      {
          return this.Json(new { success = true });
      }
  
  [DataContract]
  public class Stu
  {
      [DataMember]
      public string Name { get; set; }
  
      [DataMember]
      public int ID { get; set; }
  
      [DataMember]
      public DateTime? DOB { get; set; }
  
  }
  </code></pre>
  
  <p>But in the controller am getting null for Name and ID , default datetime for DOB, I found that there is problem in passing datetime. Is there any better way to pass datetime from view to controller? do i miss any parsing?</p>