title: How can I hide query string parameters using the Post, Redirect, Get pattern?
body: <p>I have a multi-step data entry form in my ASP.NET MVC application.</p>
  
  <p>When the information is posted, the input values are checked and if I determine that some related data is required (e.g. a purchase order references a supplier that does not exist) I redirect to another action so that the user can enter the extra data.</p>
  
  <p>I do not want the values that have already been entered by the user to be lost between pages so I am passing these to the second action method using a viewModel. The data is contained in hidden inputs on the second page so that the user can not see them.</p>
  
  <p>This works fine except I end up with a URL that looks something like this:</p>
  
  <blockquote>
    <p>myDomain/RFQ/CreatePart?PartNumber=Skateboard&amp;Supplier=Bobs%20skateboards&amp;DateCreated=08%2F28%2F2012%2000%3A00%3A00&amp;DateRequired=08%2F28%2F2012%2000%3A00%3A00&amp;Quantities=1%2C%203%20%26%205%20off</p>
  </blockquote>
  
  <p>I have tried simply returning a view instead of redirecting which gives me the URL Like this:</p>
  
  <blockquote>
    <p>myDomain/RFQ/CreatePart</p>
  </blockquote>
  
  <p>However, this gives me the problem of the user being able to repost the values by refreshing the browser as I am now no longer following the post, redirect, Get pattern.</p>
  
  <p>Is there a way of properly using the <em>Post-Redirect-Get</em> pattern whilst maintaining the cleaner URL?</p>
  
  <hr>
  
  <p><strong>Update 29th September 2012</strong></p>
  
  <p>I investigated the options listed below and have decided on using <code>SessionState</code> for the time being as this allows me to store intermediate data until the user has finished their transaction whilst allowing me to use the <em>post-redirect-get</em> pattern with a clean URL.</p>
  
  <p>I was actually aware of <code>SessionState</code> prior to asking this question but unfortunately some of the information I had read about it had led me to believe this was not the best solution (most articles cite poor performance but rarely provide any evidence of this or explain why).</p>
  
  <p>Having read <a href="http://www.codeproject.com/Articles/32545/Exploring-Session-in-ASP-Net" rel="nofollow">this</a> article I now understand <code>SessionState</code> a lot better.</p>