title: ASP.NET MVC The data doesnt come to controller from partial view used
body: <p>I have main view and main model.</p>
  
  <p>Inside this view i have such lines</p>
  
  <pre><code> foreach (var loadTask in Model.LoadTasks)
   {
       Html.RenderPartial("TripUpdateTask", new TripUpdateTaskModel { Task = loadTask });
   }
  </code></pre>
  
  <p>So in main model i have the</p>
  
  <pre><code>  public List&lt;OrderTaskRecord&gt; LoadTasks { get; set; }
  </code></pre>
  
  <p>Submodel is:</p>
  
  <pre><code>public class TripUpdateTaskModel
  {
      public OrderTaskRecord Task { get; set; }
  }
  </code></pre>
  
  <p>I played and played but still unable to save the data. Here is current and simple look.</p>
  
  <pre><code>&lt;tr&gt;    
      &lt;td&gt;Actual Time:&lt;/td&gt;
      &lt;td&gt;@Html.TextBoxFor(m =&gt; m.Task.Task.ActualTime)&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>In raw html these time controls have same name and same id. So i dont know what need to do to save that.</p>
  
  <p>I mean the data entered on main view back to controller fine, but not from partial view</p>
  
  <p>I use Html.BeginForm and fieldset in main view like this:</p>
  
  <pre><code> @using (Html.BeginForm("TripUpdate", "SupplierBookingUpdate", FormMethod.Post, new { id = "SupplierBookingUpdateSave" }))
   {
      &lt;fieldset&gt;
      .. table
      &lt;/fieldset&gt;
   }
  </code></pre>