title: Update partial view after submit Ajax.Beginform
body: <p>I am new at .NET mvc.</p>
  
  <p>In a view "DisplayThings" I have something like:</p>
  
  <pre><code>@foreach (var thing in Model)
  {
      @Html.Partial("DisplayPartial", thing)
  }
  </code></pre>
  
  <p>In the partial view "DisplayPartial" I have</p>
  
  <pre><code>@using (Ajax.BeginForm("Afunc", new AjaxOptions ()))
  {
      @Html.EditorFor(model =&gt; model.AstringThing)
      @Html.EditorFor(model =&gt; model.AintThing)
  
      &lt;input type="submit" name="submit" value="Ajax Post" /&gt;
  }
  </code></pre>
  
  <p>At the moment the "Afunc"-Action saves the model to the database and then redirects to a controller action to retrieve all "things" from the database and render the entire "Displaythings" View.</p>
  
  <p>My question is: When i press one of the submitbuttons (There is one submitbutton for every "thing" i the list). I want only that partial view to reload/reflect on my change. I dont want to reload the entire "Displaythings" view. How do I do this? If I just return a partial view I lose everything else but that partial view.</p>
  
  <p>If this is a bad approach please give me directions.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I am still doing something wrong as I get the partial view rendered in a new page. My controller : </p>
  
  <pre><code>public ActionResult Afunc(ThingModel thingmodel)
  {
      // do
  
      return PartialView("DisplayPartial", thingmodel);
  }
  </code></pre>
  
  <p>I have tried using UpdateTargetId and onsuccess both with the same result (A new page)</p>