title: How to bind HTML label to Model so that it displays data?
body: <p>I have a list that I am sending to the View from <code>GET</code> Method with the help of a <code>ViewModel</code>. I plan to send the list data to the <code>View</code> just to display it on the screen. I want this label to display the list data one-by-one in the view in a label (since I do not want to edit the data). Then, upon hitting <code>SUBMIT</code>, I want the same list data to be sent to the <code>POST</code> method where I will be able to save the data. Also, I want to do this without using <code>HTML Helpers</code>. </p>
  
  <p>Here is what I have: </p>
  
  <p><strong>MyView.cshtml</strong></p>
  
  <pre><code>&lt;html&gt;
      ...
      &lt;table class="table table-striped table-bordered" id="myTable"&gt; 
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Items&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              @for (var i = 0; i &lt; Model.MyList.Count(); i++)
              {
                  &lt;tr&gt;
                      &lt;td&gt;
                          // This is where I want to display the label. 
                          &lt;label name="MyList[@i]"&gt;@Model.MyList[i].ToString()&lt;/label&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              }
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>MyController.cs</strong></p>
  
  <pre><code>[HttpPost]
  public ActionResult MyMethod(MyViewModel VMObject)
  {
      ...
  }
  </code></pre>
  
  <p>I am able to display the list contents in the view with <code>&lt;label name="MyList[@i]"&gt;@Model.MyList[i].ToString()&lt;/label&gt;</code>. But, the <code>ViewModel</code> object that is returned in <code>POST</code> method shows that the list is <code>null</code>. Where am I going wrong?</p>
  
  <p><strong>Edit - 07/31</strong></p>
  
  <p><strong>MyViewModel.cs</strong></p>
  
  <pre><code>public class MyViewModel
  {
      public int ID { get; set; }
      public string ItemCode { get; set; }
      public int ItemId { get; set; }
      public string ItemName { get; set; }
  
      public List&lt;string&gt; MyList { get; set; }
  }
  </code></pre>