Bkjia.com Network ProgrammingFirst, add EnableEventValidation = "false" in <% @ Page %> ".
BtnOK is the ID of the submit button. Add the callback method to the Page_Load event. btnOK_Click is the server code to be implemented after submission. The overall implementation process is relatively simple.
Reference content is as follows: // Make the button unavailable and callback the server event Protected void Page_Load (object sender, EventArgs e) ...{ This. btnOK. attributes. add ("onclick", ClientScript. getPostBackEventReference (btnOK, "Click") + "; this. disabled = true; this. value = 'submitting... ';"); }
// Button processing method (51aspx.com) Protected void btnOK_Click (object sender, EventArgs e) ...{ System. Threading. Thread. Sleep (2000 ); ClientScript. RegisterStartupScript (GetType (), "btnCommit", "alert ('submitted successfully !!! '); ", True ); } |