title: Detection of page refresh / F5 key in ASP.NET MVC 2
body: <p>How would one go about detecting a page refresh / F5 key push on the controller handling the postback?  I need to distinguish between the user pressing one of two buttons (e.g., Next, Previous) and when the F5 / page refresh occurs.</p>
  
  <p>My scenario is a single wizard page that has different content shown between each invocation of the user pressing the "Next" or "Previous" buttons.  The error that I am running into is when the user refreshes the page / presses the F5 key, the browser re-sends the request back to the controller, which is handled as a post-back and the FormCollection type is used to look for the "submitButton" key and obtain its value (e.g., "Next," "Send").  This part was modeled after the post by Dylan Beattie at <a href="https://stackoverflow.com/questions/442704/how-do-you-handle-multiple-submit-buttons-in-asp-net-mvc-framework"><a href="https://stackoverflow.com/questions/442704/how-do-you-handle-multiple-submit-buttons-in-asp-net-mvc-framework">How do you handle multiple submit buttons in ASP.NET MVC Framework?</a></a>.</p>
  
  <p>Maybe I'm trying to bend MVC 2 to where it isn't meant to go but I'd like to stay with the current design in that the underlying database drives the content and order of what is shown.  This allows us to add new content into the database without modifying the code the displays the content.</p>
  
  <p>Thanks,
  Michael</p>