title: Insertion of html5 number input value into db
body: <p>I am trying to insert value of html 5 input control into db.But its value is inserting as null.Here is my code.
  View:</p>
  
  <pre><code>  @Html.LabelFor( m =&gt; m.noOfCars)
   &lt;input type="number" min="1" max="1000" step="1"&gt;
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>   public string noOfCars { get; set; }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>        [httpPost]
          public ActionResult AddVehicles(AddSpaces adspace)
           {
             if (ModelState.IsValid)
            {
             string userName = User.Identity.Name;
             var queryUser = from user in Session.Query&lt;AddSpaces&gt;()
                             where user.email == userName
                             select user;
  
             if (queryUser.Count() &gt; 0)
             {
                 foreach (var updateSpaces in queryUser)
                 {
                      updateSpaces.BPH = adspace.noOfCars;
                 }
                    Session.SaveChanges();
             }
          }
       }
  </code></pre>
  
  <p>I have changed my model's noOfCars property to int but it does not works.</p>