zoukankan      html  css  js  c++  java
  • Invalid postback or callback argument.

    [ArgumentException:   Invalid   postback   or   callback   argument.     Event   validation   is   enabled   using   <pages   enableEventValidation="true"/>   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.]  
            System.Web.UI.ClientScriptManager.ValidateEvent(String   uniqueId,   String   argument)   +367  
            System.Web.UI.Control.ValidateEvent(String   uniqueID,   String   eventArgument)   +83  
            System.Web.UI.WebControls.Button.RaisePostBackEvent(String   eventArgument)   +52  
            System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String   eventArgument)   +31  
            System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler   sourceControl,   String   eventArgument)   +32  
            System.Web.UI.Page.RaisePostBackEvent(NameValueCollection   postData)   +72  
            System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint,   Boolean   includeStagesAfterAsyncPoint)   +3843

    错误的解决方法

    1. <pages enableEventValidation="false" /> web.config中添加

    2. OnPreRender中Page.ClientScript.RegisterForEventValidation(this.UniqueID);

    参考自

    http://forums.asp.net/t/922994.aspx

  • 相关阅读:
    JavaScriptCore框架介绍
    可执行程序加载到内存的过程
    阿里云服务器怎么更换系统盘
    什么是A记录  域名
    宝塔服务器管理助手Linux面版-使用教程
    虚拟主机、VPS以及云主机的区别和对比
    怎样选择一个好的虚拟主机
    解Linux SSH命令大全,新手必看SSH命令
    虚拟主机,VPS,云主机之间的区别?
    云服务器和虚拟主机的区别:
  • 原文地址:https://www.cnblogs.com/oletan/p/1708126.html
Copyright © 2011-2022 走看看