Dropdownlist error in Ajax when the server control is submitted "event verification is enabled if the sending back or callback parameter is invalid

Source: Internet
Author: User

 

The multi-level interaction in the drop-down list is used in the project, and no Ajax server is used for processing. Later, the refreshing is too slow and Ajax (Ajax. dll) is used, and the result is

Error:

The callback parameter is invalid. Use <pages enableeventvalidation = "true"/> in the configuration, or use <% @ page enableeventvalidation = "true" %> On the page to enable event verification. For security purposes, this function verifies whether the parameters of the send-back or callback events come from the server controls that initially present these events. If the data is valid and is expected, use the clientscriptmanager. registerforeventvalidation method to register the resend or callback data for verification.

Follow the error prompt and add enableeventvalidation = "true". The error persists. Therefore, add enableeventvalidation = "false". Now, there is no error, however, when other server controls are submitted and returned to the server, they cannot obtain the items added to the sub-level dropdownlist Using ajax on the client. This is very helpless and the customer is in a hurry, I just got an updatepanel and a script to put several lists that need multi-level interaction into updatepanel and put the blocks that need to be submitted to the server for overall processing out of updatepanel, in any case, it can be used together;

After busy with this program, I was very upset about the Ajax. other solutions under DLL are searched again today. Some friends choose not to use dropdownlist but to use HTML control select, add runat = "server" to the HTML control, and then access and bind the control on the server.

Request. Form ["Control ID"] gets the value of the selected item. In combination, this solution is optimal.

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.