当用GridView导出Execl的时候,会发生只能在执行 Render() 的过程中调用 RegisterForEventValidation的错误提示
来源:互联网 发布:恒生软件 编辑:程序博客网 时间:2024/05/17 00:55
今天我出现以下问题,认为是我重写void Render(HtmlTextWriter writer)造成了.后来查资料才知道;
当用GridView导出Execl的时候,会发生只能在执行 Render() 的过程中调用 RegisterForEventValidation的错误提示。有两种方法可以解决以上问题:
1.修改web.config(不推荐)<pages enableEventValidation ="false" ></pages>
2.直接在导出Execl的页面修改
<% Page Language="C#" EnableEventValidation = "false" AutoEventWireup="true"
CodeFile="ExportGridView.aspx.cs" Inherits="ExportGridView" %>
- 当用GridView导出Execl的时候,会发生只能在执行 Render() 的过程中调用 RegisterForEventValidation的错误提示
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation;
- 只能在执行Render() 的过程中调用 RegisterForEventValidation
- 只能在执行Render() 的过程中调用 RegisterForEventValidation
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation
- 只能在执行Render() 的过程中调用 RegisterForEventValidation
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation;
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation
- 只能在执行Render()的过程中调用RegisterForEventValidation
- 只能在执行Render() 的过程中调用 RegisterForEventValidation
- 只能在执行Render() 的过程中调用 RegisterForEventValidation
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation(RegisterForEventValidation can only be called during Render(); )
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation(RegisterForEventValidation can only be called during Render()
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation(RegisterForEventValidation can only be called during Render(); )
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation(RegisterForEventValidation can only be called during Render();
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation(RegisterForEventValidation can only be called during Render(); )
- 只能在执行 Render() 的过程中调用 RegisterForEventValidation(RegisterForEventValidation can only be called during Render()
- 我的宣言
- .net3.5 和vs2008中Ajax控件的使用--AutoComplete(自动完成控件)的使用
- Linux 2.6中的字符设备驱动程序结构
- This is a test
- Subversion1.5发布
- 当用GridView导出Execl的时候,会发生只能在执行 Render() 的过程中调用 RegisterForEventValidation的错误提示
- 华硕A8SR显卡导致兰屏的解决方法
- 读后感:我要飞的更高---走出软件作坊:三五个人十来条枪 如何成为开发正规军(二十一)
- EL表达式
- 软件测试术语三(H-M)
- ubuntu上面安装ssh服务器
- js瘦身有道--选好合适的减肥药
- .net3.5 和vs2008中Ajax控件的使用--Calendar(日历)控件
- 汇编画直线