zoukankan      html  css  js  c++  java
  • Specified argument was out of the range of valid values. 解决方法

    今天用updatePanel总是遇到些奇怪的问题。刚刚就碰到下边问题。

    Sys.WebForms.PageRequestManagerServerErrorException: Specified argument was out of the range of valid values.

    详细问题描述如下:

    代码
    Specified argument was out of the range of valid values.
    Description: An unhandled exception occurred during the execution of the current web request.
    Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Source Error: 
    An unhandled exception was generated during the execution of the current web request. 
    Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace: 
    [ArgumentOutOfRangeException: Specified argument was out of the range of valid values.]
       Microsoft.Reporting.WebForms.ReportViewer.set_CurrentPage(Int32 value) +118
       Microsoft.Reporting.WebForms.ReportViewer.ClientSidePageNumberChanged(Object sender, EventArgs e) +97


        出现上边的问题是因为我在报表页面中套用了Master页面。Master页面中使用Ajax的Timer做定时取资料功能。页面运行正常,Timer第一次取资料正常,当第二次取资时出现上面的错误。

        上面的错误是由ReportViewer引起,可以不知道为什么。查了些资料找到了解决方法。

    解决方法:

      先将 ReportViewer的visiable设为False,当取到资料后,在将eportViewer的visiable设为True即可。

    参考解决方法页面:

       http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/3c555eb9-6bc2-4155-8233-67462d45fdd1

  • 相关阅读:
    MyBatis入门基础
    复制复杂链表
    二叉树中和为某一值的所有路径
    树的层次遍历
    Statement, PreparedStatement和CallableStatement的区别
    JSP有哪些动作?
    latex 输入矩阵
    Struts简单入门实例
    在Eclipse里面配置Struts2
    Windows使用Github
  • 原文地址:https://www.cnblogs.com/scottckt/p/1783682.html
Copyright © 2011-2022 走看看