无效的回发或回调参数错误? [英] Invalid postback or callback argument error?

查看:97
本文介绍了无效的回发或回调参数错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个下拉列表,我正在使用javascript填充另一个列表.在我的javascript代码中,我正在调用Web服务,并在返回结果的同时填充其他下拉列表.问题是,在我成功完成此操作后,开始发生以下错误:

I have two dropdownlists and I am filling one based on the other using javascript. In my javascript code I am calling for a webservice and with the results returned I fill the other dropdownlist. The problem is that after I have done that successfully the following error started to occur:

无效的回发或回调参数.事件验证已启用在配置中使用<%@页面中的页面EnableEventValidation ="true"%>.为了安全目的,此功能可验证回传或回调的参数事件源自最初呈现的服务器控件他们.如果数据有效且预期,请使用ClientScriptManager.RegisterForEventValidation方法以注册回发或回调数据以进行验证.

Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

有什么主意吗?

推荐答案

如果要从客户端修改生成的控件,则必须禁用事件验证或向RegisterForEventValidation注册所有可能的值.再次

If you want to modify generated controls from client side, you have to disable eventvalidation or register all possible values with RegisterForEventValidation. It's well explained here. It's because the data sent to the client and received after by the server differs.

edit:也在此处进行了回复.

edit:also responded here.

这篇关于无效的回发或回调参数错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆