title: Model not updating after jquery ajax post
body: <p>I'm working on a application which should return multiple list based on selected values.</p>
  
  <p>When a organisation is selected a few queries will run to populate a selectlist.
  These queries only return data relevant for the selected organisation.</p>
  
  <p>After that there is a dropdownlist to select which selectlist should be displayed. This will populate another dropdownlist with the data returned from the query.</p>
  
  <p>On the initial load it is loaded correctly for the first organisation. However when another organisation is selected, an ajax post will call a method. this will run the queries succesfully and set the properties to the returned lists. however the problem is that the razor page still uses the data from the initial load.</p>
  
  <p>this results in the fact that whatever organisation i will select, it will use the data from the queries for the first organisation on the razor page.</p>
  
  <p>below the ajax call</p>
  
  <pre><code>         $.ajax({
                  method: "POST",
                  url: "/Aanleveringen/Create?handler=Filter",
                  beforeSend: function (xhr) {
                      xhr.setRequestHeader("XSRF-TOKEN",
                          $('input:hidden[name="__RequestVerificationToken"]').val());
                  },
                  dataType: "json",
                  data: { organisatieId: $('#ddlOrganisatie option:selected').val() },
                  success: function (msg) {
                      alert(msg);
                  },
                  error: function (req, status, error) {
                      alert("Error try again");
                  }
              });
  </code></pre>
  
  <p>and the method:</p>
  
  <pre><code>    [HttpPost]
      public IActionResult OnPostFilter(int organisatieId)
      {
          Filter filter = new Filter();
          Organisatie organisatie = _context.Organisatie.Distinct().Where(x =&gt; x.Id == organisatieId).First();         
          FilterWaardeGemeente = filter.GetFilterGemeente(organisatie);
          FilterWaardeDienst = filter.GetFilterDienst(organisatie);
          FilterWaardeClient = filter.GetFilterClient(organisatie);
          return new JsonResult("Gelukt");
      }
  </code></pre>
  
  <p>looking for any suggestion to have the razor page model update with the most recent c# pagemodel.</p>
  
  <p>thanks in advance.</p>