【问题标题】:Asp.net GridView export to excel issueAsp.net GridView 导出到 excel 问题
【发布时间】:2012-04-11 05:58:47
【问题描述】:

我正在尝试将我的GridView 导出到 excel,但我遇到了一些问题。

起初我遇到了一些其他错误,所以我在我的页面中添加了EnableEventValidation ="false",并在我的源代码中添加了public override void VerifyRenderingInServerForm(Control control)。 现在我从 javascript 得到这个错误:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

我猜是因为我的网格在ajax 更新面板中,但我不确定。

有什么想法吗?

谢谢。

【问题讨论】:

  • 听起来您遇到了服务器端异常,并且您还告诉脚本管理器来处理错误。确保您没有任何 response.write 或 response.redirect,因为它们不能很好地与更新面板配合使用。

标签: asp.net .net ajax


【解决方案1】:

这是因为您的更新面板,如果您删除更新面板,它将起作用,或者您可以设置 PostBackTrigger 以了解详细信息,请参阅此博客文章

http://nice-tutorials.blogspot.com/2009/06/export-gridview-to-excel-within-update.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多