日期:2014-05-16  浏览次数:20700 次

“/ajax”应用程序中的服务器错误
执行:document.getElementById("DropDownList1").options.add(new Option("1","2"));
源错误: 

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  

堆栈跟踪: 


[ArgumentException: 回发或回调参数无效。在配置中使用 <pages enableEventValidation="true"/> 或在页面中使用 <%@ Page EnableEventValidation="true" %> 启用了事件验证。出于安全目的,此功能验证回发或回调事件的参数是否来源于最初呈现这些事件的服务器控件。如果数据有效并且是预期的,则使用 ClientScriptManager.RegisterForEventValidation 方法来注册回发或回调数据以进行验证。]
  System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +427
  System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +101
  System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection) +104
  System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +42
  System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +610
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2877