Asp.net clicking the server button does not trigger background events Solution

Source: Internet
Author: User

Other operations were performed before the upload button during project creation two days ago. It was found that clicking the upload button did not trigger the background submission event. The click does not respond.

It's strange.

ViewCodeThere is no exception.

 

Later, I checked that the code-behind submission was invalid! I have not figured out the cause of the failure. I hope you can talk more about it.

 

So I have to solve this problem. It will be found in the button attribute later.UsesubmitbehaviorSet it to false.

Usesubmitbehavior = "false"

Code:

Upload attachment: <asp: fileupload id = "fileupload1" runat = "server"/> <br/> <asp: button id = "button_up" runat = "server" text = "Upload" onclick = "button_up_click" usesubmitbehavior = "false"/>

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.