title: Submitting partial view data from parent view
body: <p>How to submit partial view data from parent view .</p>
  
  <p>I am newbie to MVC,<br/>
  I have created a partial view <strong>_CurrentData</strong> which contains editor controls - textbox etc
  <br/>and added Submit button in the main view:</p>
  
  <pre><code>&lt;div class="row"&gt;
      &lt;div class="col-md-12"&gt;
          @Html.Partial("_CurrentData", Model.CurrentItemDetails)
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-md-2 col-md-offset-5"&gt;
          &lt;div&gt;
              &lt;input type="button" class="btn btn-primary" value="Submit" id="btnSubmit"/&gt;
              &amp;nbsp;&amp;nbsp;
              &lt;input type="button" class="btn btn-primary" value="Cancel" id="btnCancel" /&gt;
              &lt;br/&gt;&lt;br /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>ViewModel</strong></p>
  
  <pre><code>public class ProductionViewModel
  {
      public ItemDetails CurrentItemDetails { get; set; }
  }
  
  public class ItemDetails
  {
      public int ID { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <pre><code>&lt;div class="panel panel-default"&gt;
      &lt;div class="panel-heading"&gt;
          &lt;h3 class="panel-title"&gt;Editor&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class="panel-body"&gt;
          &lt;div class="row form-group"&gt;
              &lt;div class="col-sm-4 control-label text-right"&gt;
                  &lt;strong&gt;Name:&lt;/strong&gt;
              &lt;/div&gt;
              &lt;div class="col-sm-8 control-label"&gt;
                  @Html.TextBoxFor(m =&gt; m.Name , new { @class = "form-control" })
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>now on clicking of 'btnSubmit' I want to submit data from <strong>_CurrentData</strong> view to the server and then refresh the partial view,<br/>
  How to accomplish this?</p>