title: Updating PartialView mvc 4
body: <p>Ey!
  How I could refresh a Partial View with data out of the Model?
  First time, when the page loads it's working properly, but not when I call it from the Action.
  The structure I've created looks like:</p>
  
  <p>Anywhere in my View:</p>
  
  <pre><code> @{ Html.RenderAction("UpdatePoints");}
  </code></pre>
  
  <p>My PartialView "UpdatePoints":</p>
  
  <pre><code>&lt;h3&gt;Your points are @ViewBag.points &lt;/h3&gt;
  </code></pre>
  
  <p>At the Controller I have:</p>
  
  <pre><code>public ActionResult UpdatePoints()
          {
  
              ViewBag.points =  _Repository.Points;
              return PartialView("UpdatePoints");
          }
  </code></pre>
  
  <p>Thanks for your help!</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Thanks all for your help! Finally I used JQuery/AJAX as you suggested, passing the parameter using model.</p>
  
  <p>So, in JS:</p>
  
  <pre><code>$('#divPoints').load('/Schedule/UpdatePoints', UpdatePointsAction);
  var points= $('#newpoints').val();
  $element.find('PointsDiv').html("You have" + points+ " points");
  </code></pre>
  
  <p>In Controller:</p>
  
  <pre><code>var model = _newPoints;
  return PartialView(model);
  </code></pre>
  
  <p>In View</p>
  
  <pre><code>&lt;div id="divPoints"&gt;&lt;/div&gt;
  @Html.Hidden("newpoints", Model)
  </code></pre>