title: Updated partial view model values in contoller after form submit
body: <p>In my sample MVC application I have a  model</p>
  
  <pre><code>class SampleModel
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public List&lt;Certification&gt; Certifications { get; set; }
  }
  
  class Certification
  {
      public int Id { get; set; }
      public string CertificationName { get; set; }
      public int DurationInMonths { get; set; }
  }
  </code></pre>
  
  <p>My View (I need the certification details to be shown in a partial view)</p>
  
  <pre><code>@model SampleApplication.Model.SampleModel
  &lt;!-- other code... --&gt;
  @using (Html.BeginForm("SaveValues","Sample", FormMethod.Post, new { id= "saveForm" }))
  {
      @Html.HiddenFor(m =&gt; m.Id, new { id = "hdnID" }) 
      @Html.TextBoxFor(m =&gt; m.Name, new { id = "txtName" })
      @{Html.RenderPartial("_CertDetails.cshtml", Model.Certifications);}
      &lt;input type="submit" id="btnSubmit" name="btnSubmit" value="Update"  /&gt;
  }
  </code></pre>
  
  <p>Partial View</p>
  
  <pre><code>@model List&lt;SampleApplication.Model.Certification&gt;
  &lt;!-- other code... --&gt;
  @if (@Model != null)
  {
      for (int i = 0; i &lt; @Model.Count; i++)
      {
          @Html.HiddenFor(m =&gt; m[i].Id , new { id = "CId" + i.ToString() })
          @Html.TextBoxFor(m =&gt; m[i].CertificationName,new{ id ="CName" + i.ToString() })
          @Html.TextBoxFor(m =&gt; m[i].DurationInMonths,new{ id ="CDur" + i.ToString() })
      }
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>[HttpPost]
  public ActionResult SaveValues(SampleModel sm)
  {
      //Here i am not getting the updated Certification details (in sm)
  }
  </code></pre>
  
  <p>How I get the updated values of partial view in my controller after the form post? I am able to get the updated certification values when I am not using partialview.
  Is this the right way or should I follow some other methods?</p>