Invalid postback or callback argument.Event validation is enabled using <pages enableEventValidati...

it2022-05-30  72

查了半天的资料,在一老外的网站上根据老外提示 终于解决了 

原文:

Disable eventvalidation (bad idea, because you lose a little of security that come with very little cost).

Use ASP.NET Ajax UpdatePanel. (Put the listbox in the Updatepanel and trigger a update, if you add or remove listbox. This way viewstate and related fields get updates and eventvalidation will pass.)

Forget client-side and use the classic postback and add or remove the listitems server-side.

大概中文:

eventvalidation=false

用自带的ajax 的UpdatePanel

 判断是否回传

 

在page_load里 加上if(!isPostBack)

 

 

 

转载于:https://www.cnblogs.com/wugang/archive/2012/05/03/2480718.html

相关资源:数据结构—成绩单生成器

最新回复(0)