【问题标题】:ReportViewerForMvc PartialView exceptionReportViewerForMvc PartialView 异常
【发布时间】:2018-12-08 07:14:18
【问题描述】:

这是我的 _ReportViewer.cshtml 部分视图:

@using ReportViewerForMvc
@Html.ReportViewer(ViewBag.ReportViewer as Microsoft.Reporting.WebForms.ReportViewer, new { scrolling = "no", style = "width: 100%; border-width: 0px" })

我的 MVC 操作返回 PartialView("_ReportViewer");抛出“路径的控制器'/ REPORTVIEWERWEBFORM.ASPX'未找到或未实现ICONTROLLER。”例外。

【问题讨论】:

    标签: asp.net-mvc-partialview reportviewerformvc


    【解决方案1】:

    根据问题中的错误信息,我认为这个问题一般是在你访问的页面区域和控制器所在的区域不同的时候遇到的。

    因此,我建议在控制器返回PartialView中传递区域路径并尝试一下。

    return PartialView("~/Areas/your_path/_ReportViewer.cshtml", viewModel);
    

    【讨论】:

    • @Kok 你是如何找到解决方案的?
    猜你喜欢
    • 2014-07-27
    • 1970-01-01
    • 2017-10-07
    • 2017-11-01
    • 2017-01-01
    • 1970-01-01
    • 2019-04-09
    • 2018-09-18
    相关资源
    最近更新 更多