title: Assigning a Model Property to a textbox using jQuery
body: <p>I'm unsure if this is possible but I want to use jQuery to assign value from my bound model to different textboxes inside a PartialView.</p>
  
  <p>Originally when the page loads, it populates correctly with all of the model information. However I would like to implement a DDL to view historical updates (retrieved from my pre-populated DB).</p>
  
  <p>I am able to call an Action method inside my respective controller which accepts a <code>revisionID</code>. I have verified that the method is returning the correct data.</p>
  
  <p>Please see below for my code snippets:</p>
  
  <p><strong>Partial View:</strong></p>
  
  <pre><code>$('#revisionDDL').change(function () {
      var selectedRevisionID = $(this).val();
  
      if (selectedRevisionID == '') {
          selectedRevisionID = @Model.RevisionID - 1;
      }
  
      var url = '@Url.Action("GetAgreementByRevision")';
  
      $.get(url, { revisionID: selectedRevisionID }, function () {
          $('#ChangeReason').val('@Model.ChangeReason');
      })
  });
  </code></pre>
  
  <p><strong>Input element:</strong></p>
  
  <pre><code>&lt;div class="input-group"&gt;
      &lt;span class="input-group-addon" id="change-reason"&gt;Change Reason&lt;/span&gt;
      @Html.TextAreaFor(m =&gt; m.ChangeReason, new { @class = "form-control", @rows = "1" })
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Controller method:</strong></p>
  
  <pre><code>public ActionResult GetAgreementByRevision(int revisionID)
  {
      Agreement revisedAgreement = new Agreement();
  
      revisedAgreement = _agreementService.GetAgreementDetailsByRevision(revisionID);
  
      return PartialView("AgreementDetailsFormPartial", revisedAgreement);
  }
  </code></pre>
  
  <p>If I am not able to accomplish this, what would be my other options?</p>