title: How to write Razor code for List type entity?
body: <p>My View Model is:</p>
  
  <pre><code> public class CompanyAccountViewModel
   {
      public string Name { get; set; }
      public float Interval { get; set; }
      public List&lt;string&gt; MobileNo { get; set; }
   }
  </code></pre>
  
  <p>and My view is:</p>
  
  <pre><code>@model PowerSupply.Models.CompanyAccountViewModel
  
  @{
      ViewBag.Title = "Register";
      Layout = "~/Views/Shared/_Layout.cshtml";
  }
  
  &lt;h3&gt;Register&lt;/h3&gt; &lt;br /&gt;
  
  @using (Html.BeginForm())
  {
      @Html.AntiForgeryToken()
  
  
  
      @Html.ValidationSummary(true, "", new { @class = "text-danger" })
      &lt;div class="form-group row"&gt;
          @Html.LabelFor(model =&gt; model.Name, htmlAttributes: new { @class = "col-sm-2 col-md-1 col-form-label" })
          &lt;div class="col-sm-10 col-md-3"&gt;
              @Html.EditorFor(model =&gt; model.Name, new { htmlAttributes = new { @class = "form-control" } })
              @Html.ValidationMessageFor(model =&gt; model.Name, "", new { @class = "text-danger" })
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="form-group row"&gt;
          @Html.LabelFor(model =&gt; model.Interval, htmlAttributes: new { @class = "col-sm-2 col-md-1 col-form-label" })
          &lt;div class="col-sm-10 col-md-3 positioned_relative"&gt;
              @Html.EditorFor(model =&gt; model.Interval, new { htmlAttributes = new { @class = "form-control" } })
              &lt;span class="help-text"&gt;Hour&lt;/span&gt;
              @Html.ValidationMessageFor(model =&gt; model.Interval, "", new { @class = "text-danger" })
          &lt;/div&gt;
      &lt;/div&gt;
  
  
      &lt;div class="form-group row"&gt;
          @Html.LabelFor(model =&gt; model.MobileNo, htmlAttributes: new { @class = "col-sm-2 col-md-1 col-form-label" })
          &lt;div class="col-sm-10 col-md-3"&gt;
              &lt;span class="add-new-icon glyphicon glyphicon-plus-sign" id="add_mobile"&gt; &lt;/span&gt;
  
              @Html.EditorFor(model =&gt; model.MobileNo, new { htmlAttributes = new { @class = "form-control",@id= "add_mobile" } })
              @Html.ValidationMessageFor(model =&gt; model.MobileNo, "", new { @class = "text-danger" })
  
          &lt;/div&gt;
      &lt;/div&gt;
  
  
  
  
      &lt;div class="form-group row new_mobile_wrapper"&gt;
          &lt;div class="col-md-offset-3"&gt;
              &lt;div class="new_mobile_container"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="form-group row"&gt;
          &lt;div class="col-md-offset-2 col-sm-10 col-md-2"&gt;
              &lt;input type="submit" value="Register" class="btn btn-primary col-sm-offset-1" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  }
  </code></pre>
  
  <p>Here I all field is being rendered properly but:</p>
  
  <p><code>@Html.EditorFor(model =&gt; model.MobileNo, new { htmlAttributes = new { @class = "form-control",@id= "add_mobile" } })</code></p>
  
  <p>This does not generate any markup. I point out the reason and it due to the Entity Type. Entity Type of MobileNo is List. How to modify this  <code>@Html.EditorFor</code>? Any idea? It kills my whole day.</p>