Solution for executing page_load twice on the Asp.net page

Source: Internet
Author: User

From: http://www.cnblogs.com/fantasyice/archive/2009/08/12/1416930.html

Recently, I found in the Firefox browser that the page_load method has been loaded twice. The reason is odd. I have found many solutions on the Internet, but there is no answer to the problem.

After checking Microsoft msdn, we recommend that you set autoeventwireup in the header of the ASPX page to false.

If autoeventwireup is set to false, all event delegation on the page must be manually bound.

For pages that have already written many methods, such modifications are not desirable.

After careful check on the page, I found that I don't know which brother set SRC to "" When writing the IMG control "".

In this way, when the Firefox browser is running, the IMG of src = "" will be automatically assigned the SRC value as the Browse page. Index. aspx in the IIS Site settings.

Solution: Delete the src = "" attribute of the Control and click OK!

Find the cause and record it. In case of such a problem, you can provide some help.

When writing in the future, do not set SRC.

Related Article

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.