title: How to get the value of form input in dotnet core controller
body: <p>I have view on which i have a product detail form </p>
  
  <pre><code>@model IEnumerable&lt;Shop.Models.Product&gt;
  
  &lt;form method="post" asp-controller="Product" asp-action="AddToCart"&gt;
      &lt;div class="col-md-4 col-sm-4"&gt;
          &lt;div class="card"&gt;
              &lt;img class="card-img-top" src="@item.Image" alt="Card image"&gt;
              &lt;div class="card-body"&gt;
                  &lt;span class="card-title"&gt;@item.Name&lt;b&gt;: &lt;/b&gt; &lt;/span&gt;
                  &lt;b class="card-text"&gt;$@item.Price&lt;/b&gt;
                  &lt;p class="card-text"&gt;@item.Description&lt;/p&gt;
                  &lt;input type="number" min="1" max="10" class="form-control" value="1" placeholder="Please enter quantity" /&gt;
                  &lt;button asp-controller="Product" asp-action="AddToCart"
                     asp-route-ProductId="@item.ID"
                     asp-route-ProductName="@item.Name"
                     asp-route-ItemCount="1"
                     class="btn btn-primary btn-block"&gt;Add to Cart&lt;/button&gt;                        
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Add to cart button is working as expected with default value. but now i want <code>asp-route-ItemCount="1"</code> to get value from text box i have but cant figure out the way on how to do this. I am learning dotnet thats why i dont want to use jquery ajax. </p>
  
  <p>My product model: </p>
  
  <pre><code>public class Product
  {
      public int ID { get; set; }
      public string Name { get; set; }
      public string Image { get; set; }
      public decimal Price { get; set; }
      public string Description { get; set; }
  }
  </code></pre>
  
  <p>A little help would be appreciated. thanks in advance. </p>