Solution for "sending back or invalid callback Parameters" in the Ajax drop-down menu

Source: Internet
Author: User
The callback parameter is invalid. Use in configuration

Or use Event verification is enabled. 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 sending back or callback data for verification.

During development these two days,
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 sending back or callback data for verification.

No results were found on the internet for two days.
The reason is:
The article http://www.cnblogs.com/asp600/archive/2006/11/04/550216.aspx from: swordsman

So far, there are two situations:
First, form nesting. A page can only have one form. You can solve this problem by checking the code carefully.
Second, Ajax is used in the drop-down menu, which is common in the provincial/municipal linkage menu. It may be because the initial item value of the drop-down menu is assigned to the ASPX page. This error is prompted when the event is returned, delete the initial item value from the drop-down menu and add the item to the binding event.

Later, I discovered that the problem was not there.
The reason is that the value attribute of the listitem in the dropdownlist control contains Chinese characters. You only need to change the value to English or numbers.
There is another solution on the Internet: Set the enableeventvalidation attribute to false, but there is no warning box. The data still cannot be passed to the server, resulting in the selectedindex value being zero.

It is best to add the following statement in Web. config:
<Globalization requestencoding = "UTF-8" responseencoding = "UTF-8" Culture = "ZH-CN" uiculture = "ZH-CN"/>
Now I am posting this article to help you.

It seems that ajax.net has limited support for Chinese characters, or is it because you need to set the encoding in Web. config ??????

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.