I have an ASP.NET 4.0 web form. There is a textbox I want users to submit and check. If it's correct, I blank out the textbox and don't want users to be able to resubmit that data. In IE8, users can hit back (get a resubmit warning) and if they refresh, it will resubmit the data from that text box.
I've tried setting the value to null and disabling viewstate for the textbox.
How do I stop resubmit?
You can implement the Post Redirect Get pattern as detailed here on Wikipedia to remove the refresh and double postback.
If it's absolutely vital that submissions never get processed twice, combine all of the above.
I don't think that regarding to the Back button you have any choice but to check the value on form submit again, and determine that if it is the resubmitted form or not. You have one other choice which is after submission redirect to a middle page named test.aspx which redirects to your destination page, so in this situation back button won't work.
Upon submit, you can save the fact that the form has been submitted in a session variable. When the form is submitted, you first test for this variable. If the variable is true (or whatever you set it to be) then do nothing. The user can refresh and nothing will be resubmitted.
You can post the data from the textbox using AJAX, which is better since you will not have "Back" button.
For small stuff (one field, small info) I use this one:
Take a look at the others examples, it might be useful.
Just remember to reference jQuery in your project.