title: How to catch the model sent with the partial view from the ajax call?
body: <p>I have a partial view that returns my partial view needed, but i need to catch the model because the json.encode gets the primary model sent with main view because there was no submit done to the form.</p>
  
  <p>I need to model sent with the partialview so i can use it instead of json.encode</p>
  
  <pre><code>   public ActionResult addField(List&lt;Destination&gt; model)
      {
          model.Add(new Destination
          {
              path = String.Empty,
          });
  
          return PartialView("_ChampDestination",model);
      }
  </code></pre>
  
  <p>and here is the ajax call</p>
  
  <pre><code>  function addField(event) {
  
          event.preventDefault();
          var model = @Html.Raw(Json.Encode(Model.RepertoireDestinationMultiple));
          $.ajax({
              type: 'POST',
              contentType: 'application/json',
              url: '@Url.Action("addField", "Flux")',
  
              data: JSON.stringify(model),
              success: function (response) {
                  debugger;
                  var x = response.model;
                  $(".destinationMultiple").html(response);
              }
              , error: function(xhr, textStatus, error){
                  console.log(xhr.statusText);
                  console.log(textStatus);
                  console.log(error);}
          });
  
      }
  </code></pre>
  
  <p>The new i add with the action is not registred in the main model.</p>