Prevent refresh recurring Refresh Submit resolution
Method One: Test the data table to see if there is the same data. This approach may be more meaningful to insert data, but it's a hassle to define the same data. At the same time, if the data is not inserted, it is deleted, it does not apply.
Method Two: After submitting, turn to a transition page, and then return to the current page from the transition page. This requires that after the submission, the current page URL address as a parameter pass, and can not save the cache, or "back" brings adverse consequences. However, if it is simple to delete, it seems too troublesome to wander around.
Method Three: Capture F5 events with web effects. For example, you have the following code:
Window.document.onkeydown = keystroke;
function keystroke ()
{
var key = Event.keycode;
Event.srcelement.releasecapture ();
if (key = = 116)
{
event.keycode=0;
Event.returnvalue=false;
}
}
Workaround Four:
Front button:
<asp Tutorial: Button id= "button1" runat= "Server" onclick= "Button1_Click" button "text=" onclientclick= M.submit (); This.disabled=true "usesubmitbehavior= false"/>
Background code:
protected void Page_Load (object sender, EventArgs e)
{
if (Page.IsPostBack)
{
Button1.attributes.add ("Disabled", "disabled");
}
}
The key is the red part onclientclick= "This.form.submit (); This.disabled=true" usesubmitbehavior= "false".
Workaround Five:
this.btnsubmit.attributes["onclick"] = this.getpostbackeventreference (this.btnsubmit) + "; this.disabled=tr UE; "; Prevent duplicate submissions