ASP.NET validation controls to prevent double click send button
Recently on the network see a good article ...
introduces ASP.NET validation controls to prevent the use of double click send button issue
in this way for everyone to share this article ....
Source: http : //www.ithome.com.tw/plog/index.php op = ViewArticle & articleId = 11012 & blogId = 418?
brother also did a test ... the following example:
c # example
.aspx
02
03
04
05
06
07
08
09
15
16
17
18
32
33
.cs
02 using System.Data;
03 using System.Configuration;
04 using System.Collections;
05 using System.Web;
06 using System.Web.Security;
07 using System.Web.UI;
08 using System.Web.UI.WebControls;
09 using System.Web.UI.WebControls.WebParts;
10 using System.Web.UI.HtmlControls;
11
12 public partial class doubleClick : System.Web.UI.Page
13 ...{
14 protected void Page_Load(object sender, EventArgs e)
15 ...{
16 this.Button1.Attributes.Add("onclick", "check(this);");
17 }
18 protected void Button1_Click(object sender, EventArgs e)
19 ...{
// save the simulation database 20, the processing time of 5 seconds
21 is System.Threading.Thread.Sleep (5000);
22 is Response.Write (this.TextBox1.Text);
23 is}
24}
Original: Big Box ASP.NET validation controls to prevent double click send button