I. TestCode:
1. aspx:
<% @ Page Language = "C #" autoeventwireup = "true" codefile = "default2.aspx. cs" inherits = "default2" %>
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head id = "head1" runat = "server">
<Title> untitled page </title>
2. CS:
Protected void btn_html_serverclick (Object sender, eventargs E)
{
System. Threading. thread. Sleep (3000 );
Response. Write ("actions of btn_html_serverclick ");
}
Protected void btn_standard_click (Object sender, eventargs E)
{
System. Threading. thread. Sleep (3000 );
Response. Write ("actions of btn_standard ");
}
Note: In the above Code, "system. threading. thread. sleep (3000); "is intended to avoid the button status modified with the script when the button event execution time is too short and the page is refreshed too quickly.