title: How to access model properties to create texboxfor in IEnumerable Type?
body: <p>I want to create  strongly typed textbox using Html helper in <code>@model List&lt;Proj.xx.MyClass&gt;</code>. But I am not able to access the properties of <code>MyClass</code>.</p>
  
  <p>can anyone please help me sort out the issues?</p>
  
  <pre><code>  public class MyClass
  {
  
          public string Name { get; set; }
  
          public string AddNote { get; set; }
  }
  </code></pre>
  
  <p>View</p>
  
  <pre><code> @model List&lt;Proj.xx.MyClass&gt;
           @foreach (var item in Model)
           {
            &lt;tr&gt;
              &lt;td&gt;
                  &lt;a data-toggle="modal" data-target="#AddNote"&gt;
  
                      @Html.DisplayFor(modelItem =&gt; item.Name)
                &lt;/a&gt;
  
              &lt;/td&gt;                                                                
  
          &lt;/tr&gt;
          }
  
  
   &lt;div class="modal fade" id="AddNote" role="dialog"&gt;
          &lt;div class="modal-dialog" role="document"&gt;
              &lt;div class="modal-content"&gt;
                  &lt;div class="modal-header"&gt;
                      &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;
                          &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
                      &lt;/button&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-body"&gt;                                       
                          @Html.TextBoxFor(m=&gt;m.AddNote)                             
  
                  &lt;/div&gt;
                  &lt;div class="modal-footer"&gt;
                      &lt;button type="button" class="btn btn-secondary" id="reset" data-dismiss="modal"&gt;Close&lt;/button&gt;
                      &lt;button type="submit" id="submit"&gt;Submit&lt;/button&gt;              
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>