嗯,我一直在阅读有关此内容的内容(实际上不在 stackOverflow 中),我有一些问题,需要一些关于这个“旧”主题的建议。
首先,我做什么?
使用 JavaScript 上的函数更改“onclientclick”事件的值,并在同一函数中启用控件。该下拉列表使用ajax工具包级联扩展来填充另外两个下拉列表。然后使用 webService 的 jQuery AJAX 方法保存新信息。但是我有另一个按钮可以提交整个 aspx 页面,然后我得到了期望“异常:无效的回发或回调参数。事件验证已启用......”
1.- 首先,简单快捷的选项是禁用事件验证aspx 页面,但在我阅读之前这不是一个好主意。
2.- 使用此:http://msdn.microsoft.com/en- us/library/ms223395.aspx 我不太明白这些例子:(
3.- 告别用户体验并使用“经典”提交/回发 我
我真的不想要数字 1 和 3。我想完全理解选项 2 并保持用户体验和 ASPX 的安全性,
将非常感谢您的建议
。 >已更新
我想这篇文章很好地涵盖并解释了这个已知问题(或功能):
http://odetocode.com/blogs/scott/archive/2006/03/21/asp-net-event-validation-and-invalid-callback-or-postback-argument-again.aspx
更新2
另一篇优秀的文章(参见 stackoverflow):
http://johanleino.wordpress.com/2009/11/17/cascadingdropdown-casues-invalid-postback-or-callback-argument-error/
更新3
这是导致异常的另一个原因: ASP.NET 母版页:事件验证错误< /a>
Well I've been reading about this (actually not here in stackOverflow), and I have a few question and need some advice about this "old" topic.
Firtst at all, what I do?
Change value of a on "onclientclick" event using a function on javascript and enable a control in the same function. This dropdown list use ajax toolkit cascade extension to populate two more dropdown list. Then the save the new information using the jQuery AJAX method using a webService. But I have another button that submit the whole aspx page and then I got the expcetion "exception:Invalid postback or callback argument. Event validation is enable...."
1.- First, easy and fast option is to disable Event Validation in aspx page, but until I've read this is not a good idea.
2.- Use this: http://msdn.microsoft.com/en-us/library/ms223395.aspx I don't really understand these examples :(
3.- Say good bye to the user experiencie and use "classical" submit/postback method.
I really really don't want the number 1 and 3. I would like to fully understand the option 2 and keep the user experiencie and the security of ASPX.
I'll be really grateful of any advice. Thank you.
Updated
I guess this article cover and explain very well this known issue (or feature):
http://odetocode.com/blogs/scott/archive/2006/03/21/asp-net-event-validation-and-invalid-callback-or-postback-argument-again.aspx
Updated 2
Another excellent post (seen here at stackoverflow):
http://johanleino.wordpress.com/2009/11/17/cascadingdropdown-casues-invalid-postback-or-callback-argument-error/
Update 3
This is another cause for the exception: ASP.NET Master Page: Event Validation Error
发布评论