Ticket T713899
Visible to All Users

Unknown server tag 'dx:ASPxDocumentViewer' in version 18.1.8.0

created 6 years ago

Hi there,

I read the other ticket.  Below is section from web.config which Projection Converter handle beautifully.

C#
<add assembly="DevExpress.Printing.v18.1.Core, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add assembly="DevExpress.XtraReports.v18.1, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add assembly="DevExpress.XtraReports.v18.1.Web, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add assembly="DevExpress.XtraReports.v18.1.Web.WebForms, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add assembly="DevExpress.XtraPivotGrid.v18.1, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add assembly="DevExpress.PivotGrid.v18.1.Core, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add assembly="DevExpress.XtraScheduler.v18.1.Core, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add assembly="DevExpress.Web.ASPxScheduler.v18.1, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />

webform

C#
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SupplierContact.aspx.cs" Inherits="SupplierContact" %> <%@ Register assembly="DevExpress.XtraReports.v18.1.Web.WebForms, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraReports.Web" tagprefix="dx" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <dx:ASPxDocumentViewer ID="ASPxDocumentViewer1" runat="server"> </dx:ASPxDocumentViewer> </div> </form> </body> </html>

code behind

C#
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using apreports; public partial class SupplierContact : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Session["Company"] = "Agenda Media Services, Inc"; string dbcon = DBConnection.LoadConnectionString(2014); XtraSupplierContact myReport = new XtraSupplierContact(dbcon); myReport.Parameters["Company"].Value = Session["Company"].ToString(); ASPxDocumentViewer1.Report = myReport; } }

apreports is in a separate project which contains all the AP reports.  Did ASPxDocumentViewer get drop in v 18.1.18

Show previous comments (1)

    Hi Dmitry,

    "No, we have not dropped or marked the ASPxDocumentViewer component obsolete even in v18.2"
    Good, this should save some time.  'the BC4270"  I read this another ticket.  The project isn't that big.
    My reports are in different projects for each module.  However, I made a copy with just two reports.
    I will upload a before and after along with a video.

    Thank you,
    Joe

      Here is the before

        Here is the After

        Answers approved by DevExpress Support

        created 6 years ago (modified 6 years ago)

        Hello Joe,

        Thank you for the provided projects.

        I downloaded the first archive you attached, converted it to v18.1, and noticed that "dx" tag prefix and the namespace are not registered on two web pages where ASPxDocumentViewer is located. Then, I manually inserted the following line of code (I took it from the code snippet you originally provided) and then the error went away:

        ASPx
        <%@ Register assembly="DevExpress.XtraReports.v18.1.Web.WebForms, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraReports.Web" tagprefix="dx" %>

        Note that this tag is automatically added to a web form's code when you drop a control from the toolbox. See the attached video. Does this approach help?

        I've also attached the modified sample project for your reference.

        Thanks,
        Dmitry

          Show previous comments (1)
          Vasily (DevExpress Support) 5 years ago

            Hi Joe,

            The code line that was provided by Dmitry Tok above should be added to your web form's ASPX file's code. So, registering the assembly in the web.config file is not enough in order to make our controls work on your web form, the assembly should be registered both in web.config and on the web form. I recommend you to check the HOW TO: Register an Assembly in a WebForm to Use a Custom Control help topic on the Microsoft Web Forms documentation web site for more information regarding this.

              Hi Vasily,

              Actually, you taught me to put these** tagPrefix="dx"** in the webconfig file.
              It has been working in prior versions.
              I don't know what happen. Something with name space or …? I don't known.
              It's been moved out the DevExpress.XtraReports.v18.1.Web to DevExpress.XtraReports.v18.1.Web.Webform.
              There is over 75 reports, cut and paste, cut and paste, compile, then repeat.

              Now for the other controls, it did not complain about, text fields, gridview, drop down list, …etc.
              The add assembly tag has always been required in webconfig, but the tagPrefix="dx" is optional.

              Thank you,
              Joe

              Vasily (DevExpress Support) 5 years ago

                Hi Joe,

                Actually, you taught me to put these** tagPrefix="dx"** in the webconfig file.

                Thank you for your clarification. You are right; it is possible to register tag prefixes in the web.config file. In this case the tag prefix is registered for the whole application, not only for a single web form with the Register clause. So, you can register the "dx" tag prefix from the DevExpress.XtraReports.v18.1.Web.Webform assembly in your web.config file, as demonstrated below:

                XML
                <pages validateRequest="false" clientIDMode="AutoID" theme=""> <controls> ... <add tagPrefix="dx" namespace="DevExpress.XtraReports.Web" assembly="DevExpress.XtraReports.v18.1.Web.WebForms, Version=18.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> </controls> </pages>

                I have modified the project that you sent us earlier to demonstrate this. You can find it in the attachment.

                I don't know what happen. Something with name space or …? I don't known.

                The changes that we made are described in the The ASPxReportDesigner, ASPxWebDocumentViewer, ASPxDocumentViewer and ASPxQueryBuilder classes have been moved to the DevExpress.XtraReports.v18.1.Web.WebForms assembly breaking change. So please refer to that thread for more details. In short, the ASPxDocumentViewer control was moved to the DevExpress.XtraReports.v18.1.Web.Webform assembly.

                Now for the other controls, it did not complain about, text fields, gridview, drop down list, …etc.

                This is because only Reporting components were moved to the DevExpress.XtraReports.v18.1.Web.Webform assembly. The other controls were not affected by this change.

                but the tagPrefix="dx" is optional.

                According to the WebForms platform specifics, the tag prefix registration is required to make custom controls work under this platform. So, it is necessary to register a tag prefix either on the web form or in the web.config file.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.