title: ASP.Net C# POST not returning view
body: <p>Using ASP.NET, C# and Javascript, I'm trying to dynamically get Data for the user, POST it to a controller, and return a view that changes depending on the Data.</p>
  
  <p>Here's the code :</p>
  
  <p>Javascript function :</p>
  
  <pre><code>function editEntry(id) {
      var xmlhttp = new XMLHttpRequest();
      xmlhttp.open("POST", "Edit?id=" + id, true);
      xmlhttp.send({ id: id });
      //xmlhttp.send();
  }
  </code></pre>
  
  <p>Controller handling post (a portion) :</p>
  
  <pre><code>[HttpPost]
  public ActionResult Edit(EditEvenementiel edit)
  {
      var contexte = new intranetEntities1();                       
  
      SqlParameter Id_viewBag = new SqlParameter("@id", edit.id);
      ViewBag.edit = contexte.evenementiel
         .SqlQuery("SELECT * FROM evenementiel WHERE id_evenementiel = @id", Id_viewBag);
  
      return View();
  }
  </code></pre>
  
  <p>when i fire the javascript, i can see the POST in the firebug console (working fine), i can see the variable getting the correct value in Visual Studio's Debugger, but the view doesn't change.</p>
  
  <p>I even see the expected view (with all the treatements expected) returned in the firebug console; but my page still doesn't change.</p>
  
  <p>How can i do that ?</p>