gpt4 book ai didi

c# - 将 Reportviewer 版本 11 升级到 14(2016) 失败

转载 作者:行者123 更新时间:2023-11-30 21:37:44 27 4
gpt4 key购买 nike

enter image description here我想将现有的旧 Reportviewer 升级到新的 Reportviewer 2016。我使用的是 .net Framework 4.6,它在旧版本中运行良好。

现在,当我升级到版本 14 时,它会给出运行时错误(没有异常(exception))。

值不能为 null 或空。参数名称:elementID

我已经进行了所有必要的更改,但仍然出现此错误。我引用了以下网址。

错误信息:

Server Error in '/' Application.

Value cannot be null or empty.
Parameter name: elementID

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.ArgumentException: Value cannot be null or empty.
Parameter name: elementID

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:


[ArgumentException: Value cannot be null or empty.
Parameter name: elementID]
System.Web.UI.ScriptComponentDescriptor..ctor(String type, String elementID) +127
Microsoft.Reporting.WebForms.ReportViewerClientScript.SetViewerInfo(ReportViewer viewer, String reportAreaId, String promptAreaRowId, String docMapAreaId, String fixedTableId, String topLevelUpdatePanelId, String docMapUpdatePanelId, String promptSplitterId, String docMapSplitterId, String docMapHeaderOverflowId, String directionCacheId, String browserModeCacheId, ClientPrintInfo clientPrintInfo) +163
Microsoft.Reporting.WebForms.ReportViewer.OnPreRender(EventArgs e) +4335
System.Web.UI.Control.PreRenderRecursiveInternal() +162
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6925

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2103.2

最佳答案

终于找到解决办法了。从 ReportViewer 控件中删除了 ClientIDMode="Static"。

关于c# - 将 Reportviewer 版本 11 升级到 14(2016) 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46945742/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com