title: overwrite parameters passed by querystring
body: <p>I have the following problem</p>
  
  <p>I have a web framework built with classic asp that saves the page state in hidden textboxes, and then issues a submit to itself.</p>
  
  <p>Before submitting, we have a javascript functions that saves the action in a hidden "action" input, and then performs the submit.</p>
  
  <p>The page loads the state from those hidden texts, reads the action issued, reads extra parameters, like the id of the record to edit, and then builds the page accordingly.</p>
  
  <p>I'd like to make a url link to automatically start the page with "edit" action on a "x" id.</p>
  
  <p>So I was thinking about building the following url, for example</p>
  
  <p><a href="http://myapp/user?action=edit&amp;id=23" rel="nofollow noreferrer">http://myapp/user?action=edit&amp;id=23</a></p>
  
  <p>the problem is that when the page auto-submits, que url string keeps the parameters.</p>
  
  <p>I'd like to achieve the following:</p>
  
  <p>when the user clicks on</p>
  
  <p><a href="http://myapp/user?action=edit&amp;id=23" rel="nofollow noreferrer">http://myapp/user?action=edit&amp;id=23</a></p>
  
  <p>my page should receive the posted values action=edit and id=23</p>
  
  <p>but the url should be just <a href="http://myapp/user" rel="nofollow noreferrer">http://myapp/user</a></p>
  
  <p>and both parameters should be kept in the hidden texts... (I wonder if I make myself clear...)</p>
  
  <p>thanks a lot</p>
  
  <p>saludos</p>
  
  <p>sas</p>
  
  <p>ps: I have a couple of ideas about how to solve it, but I'll post them as answers...</p>