This is a migrated thread and some comments may be shown as answers.

Ajax error

3 Answers 105 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Joan
Top achievements
Rank 1
Joan asked on 16 Mar 2012, 03:26 AM
I've seen many posts on this subject.  I was getting the tooltipmanager error on my local PC and on my DEV server.  I resolved that by changing the ajaxloadingpanel to an asp panel and by changing the DOCTYPE to <!DOCTYPE html >.  Well, the problem went away on the PC and on the DEV server.  BUT now I've moved to QA the problem is showing there. 
There are 4 similar grids on the web page. There are 2 tooltips on each RadGrid.  One on the first column that shows a formview and one on another column that shows a few lines of text and an asp table built dynamically.  I originally used a RadGrid for the table but found it gave me the error shown below.  When I changed the radgrid to visible=false the error went away and that's why I changed to an asp table.  The first tooltip works on QA and the second produces the error every time.

Partial page code:
<!DOCTYPE html >
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <ClientEvents OnRequestStart="onRequestStart" />
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Grid30">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Grid30_60" LoadingPanelID="LoadingPanelGrid30" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Grid60">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Grid60_90" LoadingPanelID="LoadingPanelGrid60" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Grid90">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Grid90Plus" LoadingPanelID="LoadingPanelGrid90" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="GridNeg">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="GridNegative" LoadingPanelID="LoadingPanelGridNegative" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
<asp:Panel runat="server" ID="LoadingPanelGridNegative">
                                        <telerik:RadToolTipManager ID="RadToolTipManagerNegativeClientName" OffsetY="-1"
                                            HideEvent="LeaveToolTip" Width="350" Height="100" runat="server" OnAjaxUpdate="OnAjaxUpdateClientName"
                                            RelativeTo="Element" Position="MiddleRight">
                                        </telerik:RadToolTipManager>
                                        <telerik:RadToolTipManager ID="RadToolTipManagerNegativeInvoice" OffsetY="-1" HideEvent="LeaveToolTip"
                                            Width="400" Height="100" runat="server" OnAjaxUpdate="OnAjaxUpdateInvoice" RelativeTo="Element"
                                            Position="MiddleLeft">
                                        </telerik:RadToolTipManager>
                                        <telerik:RadGrid runat="server" ID="GridNegative" Visible="True" AllowPaging="False"
                                            AllowSorting="true" AutoGenerateColumns="False" Skin="WebBlue" CellPadding="2"
                                            GridLines="None" ShowFooter="False" Height="250px" Width="750px">
                                            <ExportSettings ExportOnlyData="True" FileName="DebtorsCredits" IgnorePaging="True"
                                                OpenInNewWindow="True">
                                                <Excel Format="ExcelML" FileExtension="xls" />
                                            </ExportSettings>
                                            <ClientSettings EnableRowHoverStyle="True">
                                                <Resizing AllowColumnResize="true" AllowResizeToFit="True" ClipCellContentOnResize="False"
                                                    ResizeGridOnColumnResize="false" />
                                                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                                <Selecting AllowRowSelect="true" />
                                                <ClientEvents OnRowCreated="GridCreated" />
                                            </ClientSettings>
                                            <MasterTableView AllowPaging="false" AllowSorting="true" DataKeyNames="client_company_id, base_invoice, billing_line_item_id"
                                                HierarchyLoadMode="Client" Width="100%" AllowAutomaticDeletes="False" AllowAutomaticInserts="False"
                                                AllowAutomaticUpdates="False" CommandItemDisplay="Top" UseAllDataFields="true"
                                                EnableHeaderContextMenu="True">
                                                <CommandItemSettings ShowExportToExcelButton="True" ShowExportToPdfButton="False"
                                                    ShowExportToWordButton="False" ShowExportToCsvButton="False" ShowAddNewRecordButton="False"
                                                    ShowRefreshButton="False" />
                                                <Columns>
                                                    <telerik:GridBoundColumn HeaderText="Client Name" DataField="ClientName" UniqueName="ClientName"
                                                        ItemStyle-Wrap="false">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridDateTimeColumn HeaderText="Invoice Date" SortExpression="due_date" ItemStyle-Wrap="false"
                                                        DataField="due_date" DataFormatString="{0:dd MMM yyyy}">
                                                    </telerik:GridDateTimeColumn>
                                                    <telerik:GridBoundColumn HeaderText="Job<br />Number" DataField="order_code_epro"
                                                        UniqueName="order_code_epro" ItemStyle-Width="80" HeaderStyle-Width="80">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn HeaderText="Candidate" DataField="candidatename" UniqueName="candidatename"
                                                        ItemStyle-Wrap="false">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn HeaderText="Invoice<br />Number" DataField="base_invoice"
                                                        UniqueName="base_invoice" HeaderTooltip="** indicates adjusted or part paid"
                                                        ItemStyle-Width="90" HeaderStyle-Width="90">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridNumericColumn DataField="consultant_unpaid" DataFormatString="{0:n}"
                                                        HeaderText="Outstanding Revenue (Ex GST)" HeaderStyle-HorizontalAlign="Right"
                                                        ItemStyle-HorizontalAlign="Right" UniqueName="consultant_unpaid" ItemStyle-Width="100"
                                                        HeaderStyle-Width="100" ItemStyle-Wrap="false" ItemStyle-ForeColor="Red">
                                                    </telerik:GridNumericColumn>
                                                    <telerik:GridNumericColumn DataField="unpaid" DataFormatString="{0:n}" HeaderText="Invoice Balance (Inc GST)"
                                                        HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" UniqueName="unpaid"
                                                        ItemStyle-Width="100" HeaderStyle-Width="100" ItemStyle-Wrap="false" ItemStyle-ForeColor="Red">
                                                    </telerik:GridNumericColumn>
                                                    <telerik:GridBoundColumn HeaderText="Credit Officer" DataField="collectorname" UniqueName="collectorname"
                                                        ItemStyle-Wrap="false" HeaderStyle-Wrap="false">
                                                    </telerik:GridBoundColumn>
                                                </Columns>
                                            </MasterTableView>
                                        </telerik:RadGrid>
                                    </asp:Panel>

This tooltip works and is attached to the clientname column
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="CompanyTooltip.ascx.vb"
    Inherits="ConsultantDebtors.CompanyTooltip" %>
<table>
    <tr>
        <td>
            <b>Latest Collection Note for
                <asp:Label runat="server" ID="clientcompanyid"></asp:Label>
                : </b>
            <br />
            <asp:FormView runat="server" ID="CompanyNoteFormView" DataKeyNames="client_company_id"
                EmptyDataText="No collection notes found for this client.">
                <ItemTemplate>
                    <b>Date: </b>
                    <asp:Label runat="server" ID="CompanyNoteDate"><%# IIf(Eval("timestamp").Equals(DateTime.MinValue), "", Eval("timestamp", "{0:dd MMM yyyy}"))%></asp:Label>
                    <br />
                    <b>Credit Officer: </b>
                    <asp:Label runat="server" ID="CompanyCollectorNameLabel"><%# Eval("collector_name")%></asp:Label>
                    <br />
                    <b>Contact: </b>
                    <asp:Label runat="server" ID="CompanyContactNameLabel"><%# Eval("contact_name")%></asp:Label>
                    <br />
                    <asp:Label runat="server" ID="CompanyNoteComment"><%# Eval("Comment")%></asp:Label>
                </ItemTemplate>
            </asp:FormView>
        </td>
    </tr>
</table>

This one fails and is attached to the invoice column
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="InvoiceToolTip.ascx.vb"
    Inherits="ConsultantDebtors.InvoiceToolTip" %>
 
<table>
    <tr>
        <td>
            <b>Latest Note for Invoice
                <asp:Label runat="server" ID="InvoiceNumberLabel"></asp:Label>
            </b>
            <br />
            <b>Date: </b>
            <asp:Label runat="server" ID="InvoiceNoteDate"></asp:Label>
            <br />
            <b>Credit Officer: </b>
            <asp:Label runat="server" ID="InvoiceCollectorName"></asp:Label>
            <br />
            <b>Category: </b>
            <asp:Label runat="server" ID="InvoiceCategory"></asp:Label>
            <br />
            <b>Description: </b>
            <asp:Label runat="server" ID="InvoiceDescription"></asp:Label>
            <br />
            <asp:Label runat="server" ID="InvoiceNoteComment"></asp:Label>
            <br />
            <b>Invoice Total: </b>
            <asp:Label runat="server" ID="totalinvoice"></asp:Label>
            <b>Outstanding: </b>
            <asp:Label runat="server" ID="totaloutstanding"></asp:Label>
            <br />
            <b>Invoice History</b>
            <div class="RadGrid RadGrid_WebBlue">
                <asp:Table runat="server" ID="InvoiceTable" CssClass="rgMasterTable rgClipCells" CellPadding="0">
                </asp:Table>
            </div>
        </td>
    </tr>
</table>

The targetcontrols are loaded in the prerender event of the grid and are on the CELL of the grid.  The same event code is used for all 4 grids.  I found that when the targetcontrols were loaded in the itemdatabound event that the array was in the original order and not the sorted order with rather confusing results.


RadToolTipManager response error:
 Exception=Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '
<!DOCTYPE html P'.

Given that the page does not contain the text shown in the message, I must presume that somehow the QA server is rendering it thus.
Is it at all possible to view the source in the tooltip pop-up?  I'd like to know if the DOCTYPE contains the word PUBLIC or not and of course why it fails to load.

Joan.


3 Answers, 1 is accepted

Sort by
0
Joan
Top achievements
Rank 1
answered on 16 Mar 2012, 11:35 AM
I got lucky with this.  I migrated it to the production server this afternoon and didn't have the error there. The business needed it in production by Tuesday, so I was really holding my breath that it would be OK.

I still need to resolve the problem in the QA server as there may be more web pages with this design in the future.  Can someone suggest where I might look for differences.  All the servers are Windows Server 2003.
0
Accepted
Marin Bratanov
Telerik team
answered on 19 Mar 2012, 05:21 PM
Hi Joan,

I cannot be certain what exactly from the server's configuration may be causing such behavior, so I would advise that you compare settings from the production and QA servers and try to find the differences. I believe you should also check if the QA server is using the current version of your site and not some old / cached version. When speaking of cache - you can also try clearing the browser's cache, especially if some caching is configured to be added to the response of the QA server.

As for examining the actual content that comes in - you can use the IE Dev toolbar and its network tab (since IE9), Firebug for FireFox or Fiddler for older versions of IE to monitor the requests and their content. Currently most browsers offer a way to monitor network activity, e.g. Chrome shows its developer tools with Ctrl+Shift+I where you can find Network and Resources tabs.


Regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Joan
Top achievements
Rank 1
answered on 20 Mar 2012, 10:52 PM
Thank you Marin.

You led me to the cause.  It turned out to be a database permission issue, which I could see in Firebug.  Errors are redirected to an error page and that contained the "!DOCTYPE HTML PUBLIC" statement.  

Joan.
Tags
ToolTip
Asked by
Joan
Top achievements
Rank 1
Answers by
Joan
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or