erichexter / twitter.bootstrap.mvc

nuget package to make bootstrap easy with mvc4
Apache License 2.0
248 stars 134 forks source link

Cancel button should redirect to `Index` without submitting form #19

Closed serra closed 11 years ago

serra commented 11 years ago

A button input inside a form will submit the form (at least in some browsers it does). The most common action for cancel will be a redirect to Index, so we just create an action link to index and style it as a button.

I'm not really sure if this is the best general scenario, but in my case it is at least better than form submission.