title: MVC4: How do I get value from partial view for insert/edit
body: <p>I am new to MVC and I am just trying to get a grip on certain aspects of MVC that I will be using in the project I have coming up.  So, I have a view where the user will input data regarding training: name, id, location, and training dates.  I have created partial view that will be used for the dates, it incorporates the jQuery date picker and a date mask.  This pv will replace date fields where needed. It all works fine, but, I do not know how to get the value placed in the partial view to be passed back into the model, once the user clicks the "Create" or "Edit" button.</p>
  
  <p>Here is my code (Edit View):</p>
  
  <pre><code>@Html.Partial("partialview", Model.ValueToPass)
  </code></pre>
  
  <p>And For the partial view:</p>
  
  <pre><code>@model Nullable&lt;DateTime&gt;
  @{ 
  string dt = string.Empty;
  if (Model != null) { dt = Model.Value.tostring("MM/dd/yyyy"); }
  &lt;script type="text/javascript"&gt;.......&lt;/script&gt;
  &lt;p&gt; @Html.TextBox("Test", dt, new {@class = "DateTextArea"}) &lt;/p&gt;
  </code></pre>
  
  <p>As stated, I can get a preexisting date from the model loaded into the textbox, without issue, its just retrieving that value or new value, if the user enters a new date, and putting it into the database.  Any help or direction would be of great help.  Thank you.</p>