title: Passing @Html.DisplayFor() - values from view to controller
body: <p>I'm having these classes:</p>
  
  <pre><code>public class ProductViewModel
  {
      public IEnumerable&lt;Product&gt; Products { get; set; }
  
  }
  
  public class Product
  {
      public int ArticeNr { get; set; }
      public string Name { get; set; }
  
  }
  </code></pre>
  
  <p>And this view</p>
  
  <pre><code>@model ProductsViewModel
  
  @using (Html.BeginForm("Index", "Home", FormMethod.Post))
  {
  &lt;table class="table"&gt;
  
      @foreach (var item in Model.Products) {
          &lt;tr&gt;
              &lt;td&gt;
                  @Html.DisplayFor(modelItem =&gt; item.ArticleNr)
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.DisplayFor(modelItem =&gt; item.Name)
              &lt;/td&gt;
          &lt;/tr&gt;
      }
  &lt;/table&gt;
  
  &lt;input type="submit" value="submit" name="submitButton" /&gt;
  }
  </code></pre>
  
  <p>How can I pass All my values from Model.Products to the Controller? I want all my values in the foreach-loop sent to the controller</p>
  
  <p>My controller is taking ProductsViewModel as parameter. But the values after I post in <code>model.Products</code> is null.</p>
  
  <pre><code>        public ActionResult Index(ProductsViewModel model) //here, model.Products is always null after post
          {
              //LOGIC
          }
  </code></pre>