title: Html does not refresh after ajax post in asp.net core
body: <p>I have asp.net core application. I am using jQuery ajax to post data to server. When server receives the model, it updates all model properties with timestamp and returns the partial view with updated model. On client side jQuery simply puts the response html inside <code>div</code></p>
  
  <p>Below is my sample code</p>
  
  <p><strong>Model Class</strong>  </p>
  
  <pre><code>public class MyModel
  {
      public string FirstName { get; set; }
  
      public string LastName { get; set; }
  
      public string City { get; set; }
  }
  </code></pre>
  
  <p><strong>Controller</strong>   </p>
  
  <pre><code>public class HomeController : Controller
      {
          public IActionResult Index()
          {
              return View(new MyModel { FirstName = "Foo", LastName = "Bar", City = "Dallas" });
          }        
  
          public IActionResult PostData(MyModel model)
          {
              model.FirstName = model.FirstName + string.Format(" {0:ss}", DateTime.Now);
              model.LastName = model.LastName + string.Format(" {0:ss}", DateTime.Now);
              model.City = model.City + string.Format(" {0:ss}", DateTime.Now);
  
              return PartialView("_MyPartialView", model);
          }
      }
  </code></pre>
  
  <p><strong>Index View</strong></p>
  
  <pre><code>@model MyModel   
  &lt;div id="mydetail"&gt;
      @Html.Partial("_MyPartialView.cshtml", Model)
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>_MyPartialView</strong></p>
  
  <pre><code>@model MyModel
  
  &lt;form id="myform"&gt;
      &lt;div class="readonly"&gt;
          This is readonly section. This section gets refreshed after POST
          @Model.FirstName
          @Model.LastName
          @Model.City
      &lt;/div&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-lg-3"&gt;
              &lt;input asp-for="FirstName" /&gt;
          &lt;/div&gt;
          &lt;div class="col-lg-3"&gt;            
              @Html.TextBoxFor(x=&gt;x.LastName) 
          &lt;/div&gt;
          &lt;div class="col-lg-3"&gt;
              &lt;input id="City" name="City" type="text" value="@Model.City" /&gt; 
          &lt;/div&gt;
      &lt;/div&gt;
      @DateTime.Now.ToString()
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>javascript</strong></p>
  
  <pre><code>$(function () {
      var form = $("#myform");
      $('#btn').click(function () {
          $.ajax({
              cache: false,
              type: 'POST',
              url: '/home/postdata',
              data: form.serialize(),
              dataType: 'html',            
              contentType: 'application/x-www-form-urlencoded; charset=UTF-8'
          })
          .done(function (response, textStatus, jqXHR) {
              $('#mydetail').html(response);
          })
          .fail(function (response, textStatus, errorThrown) {
              alert(response);
          })
      })
  })
  </code></pre>
  
  <p>MyModel has 3 properties <code>FirstName</code>, <code>LastName</code> and <code>City</code>. For demonstration purpose i am using 3 different ways to render these properties as TextBox.  </p>
  
  <p><strong>Steps</strong>   </p>
  
  <ol>
  <li>User Clicks on the button to post model to server.   </li>
  <li>Server gets the model and append the model with timestamp (seconds).    </li>
  <li>Server returns partial view with updated model.   </li>
  <li>In read only section partial view writes the properties as text. eg @Model.FirstName, @Model.LastName, @Model.City   </li>
  <li>Partial view also renders properties as <code>input</code> field. (Note each input field is using different syntax)</li>
  </ol>
  
  <p><strong>Issue</strong><br>
  Upon successful POST, when partial view gets rendered then only <code>readonly</code> section and <code>City</code> property gets refreshed and i see updated data. However <code>FirstName</code> and <code>LastName</code> does not get refreshed. 
  Why <code>input</code> field that is using <code>Tag-Helper</code> and <code>Html Helper</code> does not get refreshed?</p>
  
  <p>is this a bug in ASP.NET Core?</p>