asp.net| Button | solve | refresh | Problem all the time, asp,php to process submitting data to another page, because it takes a lot of effort to handle the decision on this page. This makes it possible to implement a small function with a lot of files, while benefiting from repeated submissions when submitting forms or deleting data.
The introduction of ASP.net makes this issue a reverse change, asp.net events and event delegates, the program can easily know that the user is clicked on the button and processed accordingly. That's the problem. The page refresh operation is an operation within the browser because the browser does not issue any external notifications for the event or callback. The program does not know whether the user is a button or a refresh, submits the form or deletes the data when it is submitted repeatedly.
There are also direct one in the ASP.net, then 1 and 1 are wrong, but to be in the URL of the value, such as after test.aspx?test=2, 1 and 1 will not be an error.
For refresh problem, we can refer to http://www.microsoft.com/china/msdn/library/webservices/asp.net/BedrockAspNet.mspx
If you don't use his refresh judgment, just ask your Web page to be able to prevent SQL injection.
You just have to join in your web.config.
<appSettings>
<add key= "Sql_banfilename" value= "banfilename.htm"/>//if the URL of the current request? There are SQL keywords after
Jumps to the current page.
</appSettings>
<system.web>
<add name= "Module" type= "My.Refresh.RefreshModule, Refresh"/>//http the request to the page's inheritance class processing.
</system.web>