title: ASP.NET MVC: The correct way to handle a cancel button
body: <p>I'm wanting to have a simple cancel button so on confirmation of, say, the deletion of a product, they can change their mind and click cancel before the actual delete action is started.</p>
  
  <p>I figure that on clicking the button you are wanting to redirect the user to the previous page. I understand that a common way to handle this is with javascript</p>
  
  <pre><code>onclick="javascript:history.back(1);"
  </code></pre>
  
  <p>Is this acceptable? If the user has javascript disabled, what happens then? </p>
  
  <p>So instead, I figured that I would submit the form and an action would redirect the user to the previous page. Is this how it should be done? And if so, what is the C# code to do this?</p>
  
  <p>Thanks for any help :)</p>