An error occurs because an automatic control is not found to trigger a send-back event.

Source: Internet
Author: User
Error message: An error occurs because the control with the automatically generated ID "mph: _ ctl0: ctlorderamendments: _ ctl195: _ ctl0" is not found. To avoid this error, explicitly set the ID attribute of the control that triggers the send-back event.

Note:An error occurred while executing the current Web request. Check the stack trace information to learn about this error andCodeDetailed information about the cause of the error.

Exception details:System. Web. httpexception: an error occurs because the control with the automatically generated ID "mph: _ ctl0: ctlorderamendments: _ ctl195: _ ctl0" cannot be found. To avoid this error, explicitly set the ID attribute of the control that triggers the send-back event.

Source error:

An unhandled exception is generated during the execution of the current Web request. You can use the following exception stack trace information to determine the cause and location of the exception.

Stack trace:

[Httpexception (0x80004005): failed to find the control with the automatically generated ID "mph: _ ctl0: ctlorderamendments: _ ctl195: _ ctl0" to trigger a send-back event, an error occurs. To avoid this error, explicitly set the ID attribute of the control that triggers the send-back event.] System. Web. UI. Page. processpostdata (namevaluecollection postdata, Boolean fbeforeload) + 853 system. Web. UI. Page. processrequestmain () + 878

Version: Microsoft. NET Framework Version: 1.1.4322.573; ASP. NET version: 1.1.4322.573

Solution: After my careful tracking, I finally solved the problem. The prompt information is correct. It is true that there is a control on this page that does not display a set ID, leading to an error.

Question: The problem lies in the general control of a page. No Set ID is displayed, but why is there no such error on other pages? Only this error is displayed on this page, I was wondering if it was because some server-side controls, such as textbox and checkbox, were automatically generated when I returned the page, the view information of these controls does not exist in the newly loaded pages. Therefore, when the page is processing data return, there is no available view for these new controls. Therefore, an error occurs. In this case, the same problem may occur on other pages, But the strange thing is, no.
Further, it may be because, during page initialization, an ID is automatically set for each control without a specified ID, therefore, duplicate IDs may occur when IDs are set automatically!

I am confused when I think of this. I don't know what the mistake is...

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.