Updates
This breaking change was last updated on May 31, 2023.
What Changed
Updated on May 31, 2023
The ASPxDocumentViewer and ReportViewer classes are obsolete as of v23.1.
Changes in v19.1
The ASPxDocumentViewer and ReportViewer classes became deprecated in v19.1.
Applications that contain the ASP.NET Document Viewer will compile and work without any changes. However, you can no longer add the Document Viewer using the UI.
Reasons for Change
In v15.1, we introduced the Web Document Viewer based on HTML5/JS. The Viewer supports all previous ASP.NET Document Viewer features and has the following advantages:
- modern HTML5/JS architecture
- pixel-perfect document rendering
- asynchronous document building
- mobile mode and touch support
- built-in caching mechanism that improves preview performance
- advanced client-side customization mechanism
- in-place content-editing
- interactive sorting
How to Update Existing Apps
We recommend that you use the ASPxWebDocumentViewer class instead of the ASPxDocumentViewer class.
How to Use Obsolete Classes
- ASP.NET WebForms Applications
The Web Document Viewer’s smart tag no longer allows you to switch to the deprecated ASP.NET Document Viewer component.
If you still want to use the deprecated Viewer in an ASP.NET WebForms application, add this control to an ASPX file markup:
ASPx<%--...--%>
<dx:ASPxDocumentViewer ID="ASPxDocumentViewer1" runat="server" Height="1000px" Width="100%" ReportTypeName="DXWebApplication1.XtraReport1" />
- ASP.NET MVC Applications
The Insert DevExpress MVC Extension no longer contains the DocumentViewer item.
To add the deprecated Viewer to an ASP.NET MVC application, manually register the DocumentViewer extension in your View file.
C#@Html.DevExpress().DocumentViewer(settings =>{
settings.Name = "documentViewer1";
settings.Report = (DXWebApplication1.XtraReport1)ViewData["Report"];
settings.CallbackRouteValues = new { Controller="Home", Action="DocumentViewerPartial" };
settings.ExportRouteValues = new { Controller="Home", Action="ExportDocumentViewer" };
}).GetHtml()