title: update part of the page after unobtrusive ajax post on Razor Pages
body: <p>I have Razor Pages with one form. It posts data and set some status message. Post is done via ajax unobtrusive way. However, in this way status message is never appeared on the page. Can you, please, guide me how this Update is done on Razor Pages?</p>
  <p><strong>HTML part</strong></p>
  <pre><code>&lt;form method=&quot;post&quot; asp-controller=&quot;Home&quot; asp-action=&quot;Index&quot; data-ajax=&quot;true&quot; data-ajax-loading=&quot;#loading&quot;&gt;
     &lt;div class=&quot;form-group&quot;&gt;
          &lt;input id=&quot;code&quot; asp-for=&quot;Code&quot; type=&quot;text&quot; class=&quot;form-control&quot;/&gt;
      &lt;/div&gt;
      &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot;&gt;Check&lt;/button&gt;
  &lt;/form&gt;
  
  // I need to update this part
  &lt;div class=&quot;result&quot;&gt;
      Result
      &lt;span class=&quot;message&quot;&gt;@Model.CheckMessage&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>Backend part</strong></p>
  <pre><code>    public class IndexModel : PageModel
      {
       
          [Required]
          [BindProperty]
          public string Code { get; set; }
  
          public string CheckMessage { get; set; }
  
          public async Task&lt;IActionResult&gt; OnPostAsync()
          {
            this.CheckMessage = &quot;Test&quot;; // how to make this work
            return Page();
          }
  </code></pre>