title: Binding Model to Text box in Razor view
body: <p>I have ViewModel and Model as below</p>
  
  <pre><code>public class MyViewModel
      {  
          public List&lt;MyModel&gt; MyItems { get; set; }
          /* There are many other properties*/
      }
  
      public class MyModel
      {
          public string  MyType { get; set; }
          public decimal value1 { get; set; }
          public decimal value2 { get; set; }
      }
  </code></pre>
  
  <p>I am binding the razor view as below. For column 1 I can just show the string. For columns 2 and 3 I need to show text boxes with data from the model.  </p>
  
  <pre><code> &lt;table &gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;My Column1&lt;/th&gt;
          &lt;th&gt;My Column2&lt;/th&gt;
          &lt;th&gt;My Column3&lt;/th&gt;
        &lt;/tr&gt;
        &lt;/thead&gt;
          &lt;tbody&gt;
           @foreach (var myItem in Model.MyItems)
              {
                &lt;tr&gt;
                  &lt;td&gt;
                     @myItem.MyType
                  &lt;/td&gt;
                 &lt;td&gt;@Html.TextBoxFor( ??? )&lt;/td&gt;
       &lt;td&gt;&lt;/td&gt;
                &lt;/tr&gt;
                }
            &lt;/tbody&gt;
   &lt;/table&gt;
  </code></pre>
  
  <p>In normal cases I see that we can do like @Html.TextBoxFor(m => m.myvalue1). But how to do it in the above case. Please suggest.</p>