Comparison between the disabled attribute of standard button and HTML button

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.