title: My Asp.NET HttpGet action (that return a FileResult) is only called once in the src of a object tag after a jquery post
body: <p>I have a tag object that is loaded dinamically by javascript. This tag is loaded after a jquery post:</p>
  
  <pre><code>$.post('@Url.Action("ShowCredential", "ManageCredentials")',  
      $(form).serialize(), function(url) { 
      document.getElementById("credential_preview").innerHTML = "&lt;object id='credencial_atual' type='application/pdf' classid='clsid:CA8A9780-280D-11CF-A24D-444553540000' width='250' height='420' style='border: 1px solid'&gt; &lt;param name='src' value='" + url + "#navpanes=0&amp;scrollbar=0&amp;zoom=100%' /&gt;&lt;/object&gt;"; 
  
      $("#preview_popup").show(); 
  }); 
  </code></pre>
  
  <p>Obs: i load the form variable with my form.</p>
  
  <p>In my code-behind of the action "ShowCredential" i load a pdf in byte[] and store in my user session:</p>
  
  <pre><code>[HttpPost] 
  public string ShowCredential(/* the attributes to help to load the pdf */) 
  { 
      // Loading my pdf... 
      Session.User.CurrentPDF = // set the pdf loaded 
  
      UrlHelper urlHelper = new UrlHelper(this.ControllerContext.RequestContext); 
      string url = urlHelper.Action("GetPDF", "ManageCredentials"); 
  
      return url; 
  }
  </code></pre>
  
  <p>The url is generated with the action that will return the pdf.</p>
  
  <pre><code>[HttpGet] 
  public FileResult GetPDF() 
  { 
      return File(Session.User.CurrentPDF, "application/pdf"); 
  } 
  </code></pre>
  
  <p>So, in the first time, ok, is loaded the right pdf, but in the second, third... is loaded the same pdf, why? (i checked if i pass the right params, yes i pass =))</p>
  
  <p>Obs: When i post the data to load the pdf, after - in jquery return - my code call the action GetPDF in the first time, but, when i post again, the action GetPDF is not called anymore.</p>