The postback or callback parameter is invalid. Use <pages enableeventvalidation= "true" in the configuration/> or use <%@ page enableeventvalidation= "true" in pages

Source: Internet
Author: User

The postback or callback parameter is invalid. Use <pages enableeventvalidation= "true" in the configuration/> or use <%@ page enableeventvalidation= "true"%> to enable event validation. For security purposes, this feature verifies that the parameters of the postback or callback event originate from the server control that originally rendered the events. If the data is valid and is expected, use the Clientscriptmanager.registerforeventvalidation method to register the postback or callback data for validation.

This two-day writing program always encounters similar programs on different pages, and the results appear differently. The following are the issues that arise today:

The postback or callback parameter is invalid. Use <pages enableeventvalidation= "true" in the configuration/> or use <%@ page enableeventvalidation= "true"%> to enable event validation. For security purposes, this feature verifies that the parameters of the postback or callback event originate from the server control that originally rendered the events. If the data is valid and is expected, use the Clientscriptmanager.registerforeventvalidation method to register the postback or callback data for validation.

Search the internet for a bit, the possible solutions are:

1. Add <%@ page language= "C #" autoeventwireup= "true" codefile= "Default.aspx.cs" inherits= "_default"%> Enableeventvalidation= "False" will be OK. (First consideration)

2, is nested form, a page can only have a form, carefully check the code can be resolved.

3. If a page contains a control such as a DropDownList or a ListBox, the following may be the cause:

3.1 Use Ajax in the drop-down menu, common in the provincial and municipal linkage menu, may be due to the ASPX page assigned to the drop-down menu initial item value, when the event postback prompt the error, the drop-down menu initial item value is deleted, the item item is added in the binding event.

3.2 The reason is that the Value property of the DropDownList control's ListItem contains Chinese characters. Just change the value to English or digital. It is a good idea to add the following statement in Web. config:
<globalization requestencoding= "Utf-8" responseencoding= "Utf-8" culture= "ZH-CN" uiculture= "ZH-CN"/> Because POSTBACK If you do not use UTF-8 encoding, JAVASCRIPT will think there is a problem.
Only change requestencoding= "Utf-8" on it, responseencoding= "Utf-8" not

The http://hi.baidu.com/rolodomain/blog/item/c4096e897aa9dbb70e2444a5.html postback or callback parameter is invalid. Event validation is enabled in the configuration using Enableeventvalidation=true or using the page.

The postback or callback parameter is invalid. Use <pages enableeventvalidation= "true" in the configuration/> or use <%@ page enableeventvalidation= "true"%> to enable event validation. For security purposes, this feature verifies that the parameters of the postback or callback event originate from the server control that originally rendered the events. If the data is valid and is expected, use the Clientscriptmanager.registerforeventvalidation method to register the postback or callback data for validation.

The possible solutions are:

1. Add <%@ page language= "C #" autoeventwireup= "true" codefile= "Default.aspx.cs" inherits= "_default"%> Enableeventvalidation= "False" will be OK. (First consideration)

2, is nested form, a page can only have a form, carefully check the code can be resolved.

3. If a page contains a control such as a DropDownList or a ListBox, the following may be the cause:

3.1 Use Ajax in the drop-down menu, common in the provincial and municipal linkage menu, may be due to the ASPX page assigned to the drop-down menu initial item value, when the event postback prompt the error, the drop-down menu initial item value is deleted, the item item is added in the binding event.

3.2 The reason is that the Value property of the DropDownList control's ListItem contains Chinese characters. Just change the value to English or digital. It is a good idea to add the following statement in Web. config:
<globalization requestencoding= "Utf-8" responseencoding= "Utf-8" culture= "ZH-CN" uiculture= "ZH-CN"/> Because POSTBACK If you do not use UTF-8 encoding, JAVASCRIPT will think there is a problem.
Only change requestencoding= "Utf-8" on it, responseencoding= "Utf-8" not

The postback or callback parameter is invalid. Use <pages enableeventvalidation= "true" in the configuration/> or use <%@ page enableeventvalidation= "true" in pages

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.