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

DropdownSys.WebForms.PageRequestManagerParserErrorException

1 Answer 86 Views
AJAX and Web 2.0
This is a migrated thread and some comments may be shown as answers.
pratik
Top achievements
Rank 1
pratik asked on 10 Jul 2009, 08:03 PM
Hi, Sometime I am getting following error while I changed the dropdown index(autopostback=true)..

 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.

please tell me what's the wrong with this??

here is my page code
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MasterContentPlaceHolder">
    <telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server">
            <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading7.gif") %>'
                alt="Loading..." style="border: 0;"/>
        </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManagerProxy ID="ajaxProxyContracts" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="tsContractCapture">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="tsContractCapture" />
                    <telerik:AjaxUpdatedControl ControlID="mpContractCapture" LoadingPanelID="LoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmbContractType">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="tsContractCapture" />
                    <telerik:AjaxUpdatedControl ControlID="mpContractCapture" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="chkAutoRenewal">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="tsContractCapture" />
                    <telerik:AjaxUpdatedControl ControlID="mpContractCapture" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmbGLCountry">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="tsContractCapture" />
                    <telerik:AjaxUpdatedControl ControlID="mpContractCapture" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadTabStrip AutoPostBack="true" ID="tsContractCapture" OnTabClick="tsContractCapture_TabClick" runat="server" MultiPageID="mpContractCapture">
        <Tabs>
            <telerik:RadTab runat="server" Value="0" Text="General" Selected="true" >
            </telerik:RadTab>           
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="mpContractCapture" runat="server" Width="100%">
        <telerik:RadPageView BorderColor="Gray" Selected="true" BorderStyle="Solid" BorderWidth="1" ID="pvGeneral"
            runat="server">
            <Control:General ID="ucGeneral" runat="server" />
        </telerik:RadPageView>       
    </telerik:RadMultiPage>
    <asp:HiddenField ID="hdnContractID" runat="server" Value="-1" />   
</asp:Content>


and here is my general control code..



<script type="text/javascript">
    function validateCombo(source, args) {
        args.IsValid = false;
        var combo = $find('<%= cmbCounterparty.ClientID %>');
        var text = combo.get_text();
        if (text.length < 1) {
            args.IsValid = false;
        }
        else {
            var node = combo.findItemByText(text);
            if (node) {
                var value = node.get_value();
                if (value.length > 0 && value != -1) {
                    args.IsValid = true;
                }
            }
            else {
                args.IsValid = false;
            }
        }
    }
</script>

<table width="100%" border="0" cellpadding="0" cellspacing="3">   
    <tr>
        <td align="right">
            Contract Type
        </td>
        <td width="80%">
            <telerik:RadComboBox CausesValidation="false" OnSelectedIndexChanged="cmbContractType_SelectedIndexChanged"
                ID="cmbContractType" AutoPostBack="true" runat="server" Width="250px">
                <CollapseAnimation Duration="200" Type="OutQuint" />
            </telerik:RadComboBox>

            &nbsp;
            <asp:RequiredFieldValidator Display="Dynamic" InitialValue="Select Contract Type"
                ID="reqVal_ContractType" runat="server" ControlToValidate="cmbContractType" ValidationGroup="Contract">
                <asp:Image runat="server" ID="Image2" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
            </asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td align="right">
            Counterparty
        </td>
        <td width="80%">
            <telerik:RadComboBox CausesValidation="false" ID="cmbCounterparty" runat="server"
                Width="250px">
                <CollapseAnimation Duration="200" Type="OutQuint" />
            </telerik:RadComboBox>
            &nbsp;
            <asp:CustomValidator ValidationGroup="Contract" ID="CustomValidator1" runat="server"
                ClientValidationFunction="validateCombo" ControlToValidate="cmbCounterparty"
                ErrorMessage="*" OnServerValidate="CustomValidator1_ServerValidate">
                <asp:Image runat="server" ID="Image4" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
            </asp:CustomValidator>
        </td>
    </tr>   
    <tr>
        <td align="right">
            Start Date
        </td>
        <td width="80%">
            <telerik:RadDatePicker ID="dpStartDate" runat="server" Width="250px">
                <Calendar runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                </Calendar>
                <DatePopupButton ImageUrl="~/images/CalendarPopUp.png" HoverImageUrl="~/images/CalendarPopUp.png" />
            </telerik:RadDatePicker>
            &nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="dpStartDate"
                ValidationGroup="Contract">
                <asp:Image runat="server" ID="Image6" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
            </asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td align="right">
            End Date
        </td>
        <td width="80%">
            <telerik:RadDatePicker ID="dpEndDate" runat="server" Width="250px">
                <Calendar runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                </Calendar>
                <DatePopupButton ImageUrl="~/images/CalendarPopUp.png" HoverImageUrl="~/images/CalendarPopUp.png" />
            </telerik:RadDatePicker>
        </td>
    </tr>
    <tr>
        <td align="right">
            Execution Date
        </td>
        <td width="80%">
            <telerik:RadDatePicker ID="dtExecutionDate" runat="server" Width="250px">
                <Calendar runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x">
                </Calendar>
                <DatePopupButton ImageUrl="~/images/CalendarPopUp.png" HoverImageUrl="~/images/CalendarPopUp.png" />
            </telerik:RadDatePicker>
            &nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="dtExecutionDate"
                ValidationGroup="Contract">
                <asp:Image runat="server" ID="Image7" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
            </asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td width="100%" colspan="2">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="2" width="100%">
                            <tr>
                                <td width="20%" align="right">
                                    <asp:CheckBox AutoPostBack="true" OnCheckedChanged="chkAutoRenewal_CheckedChanged"
                                        ID="chkAutoRenewal" Text="Auto-Renewal" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td width="20%" align="right">
                                    Renewal Terms
                                </td>
                                <td width="80%">
                                    <table border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <telerik:RadNumericTextBox CausesValidation="false" Enabled="false" ID="ntxtCounter"
                                                    runat="server" ShowSpinButtons="True" MinValue="0" Value="1.00">
                                                    <NumberFormat DecimalDigits="0" />
                                                </telerik:RadNumericTextBox>
                                                &nbsp;
                                                <asp:RequiredFieldValidator Display="Dynamic" InitialValue="0" ID="req_ntxtCounter"
                                                    runat="server" ControlToValidate="ntxtCounter" ValidationGroup="Contract">
                                                    <asp:Image runat="server" ID="Image8" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
                                                    &nbsp;</asp:RequiredFieldValidator>
                                            </td>
                                            <td>
                                                <telerik:RadComboBox ID="cmbPeriod" Enabled="false" runat="server">
                                                    <Items>
                                                        <telerik:RadComboBoxItem runat="server" Text="Day(s)" Value="Day(s)" />
                                                        <telerik:RadComboBoxItem runat="server" Text="Week(s)" Value="Week(s)" />
                                                        <telerik:RadComboBoxItem runat="server" Text="Month(s)" Value="Month(s)" />
                                                        <telerik:RadComboBoxItem runat="server" Text="Year(s)" Value="Year(s)" />
                                                    </Items>
                                                    <CollapseAnimation Duration="200" Type="OutQuint" />
                                                </telerik:RadComboBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td width="20%" align="right">
                                    Renewal Reminder
                                </td>
                                <td>
                                    <telerik:RadNumericTextBox Enabled="false" ID="ntxtRenewalReminder" runat="server"
                                        ShowSpinButtons="True" MinValue="0" Value="1.00">
                                        <NumberFormat DecimalDigits="0" />
                                    </telerik:RadNumericTextBox>
                                    &nbsp;
                                    <asp:RequiredFieldValidator Display="Dynamic" InitialValue="0" ID="req_RenewalReminder"
                                        runat="server" ControlToValidate="ntxtRenewalReminder" ValidationGroup="Contract">
                                        <asp:Image runat="server" ID="Image9" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
                                        &nbsp;</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td width="20%" align="right">
                                    Early Termination
                                </td>
                                <td>
                                    <telerik:RadNumericTextBox ID="ntxtEarlyTermination" runat="server" ShowSpinButtons="true"
                                        MinValue="0" Value="1.00">
                                        <NumberFormat DecimalDigits="0" />
                                    </telerik:RadNumericTextBox>
                                    &nbsp;
                                    <asp:RequiredFieldValidator Display="Dynamic" InitialValue="0" ID="req_EarlyTermination"
                                        runat="server" ControlToValidate="ntxtEarlyTermination" ValidationGroup="Contract">
                                        <asp:Image runat="server" ID="Image10" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
                                        &nbsp;</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td width="20%" align="right">
                                    Governing Law
                                </td>
                                <td>
                                    <table border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <telerik:RadComboBox ID="cmbGLCountry" runat="server" Width="150px" OnSelectedIndexChanged="cmbGLCountry_SelectedIndexChanged"
                                                    AutoPostBack="True" CausesValidation="False">
                                                    <CollapseAnimation Duration="200" Type="OutQuint" />
                                                </telerik:RadComboBox>

                                                <asp:RequiredFieldValidator Display="Dynamic" InitialValue="Select Country" ID="RequiredFieldValidator5"
                                                    runat="server" ControlToValidate="cmbGLCountry" ValidationGroup="Contract">
                                                    &nbsp;<asp:Image runat="server" ID="Image11" AlternateText="*" CssClass="error_text"
                                                        ImageUrl="~/images/Delete16.png" />
                                                    &nbsp;</asp:RequiredFieldValidator>
                                            </td>
                                            <td style="padding-left: 3px;">
                                                <telerik:RadComboBox ID="cmbGLStats" runat="server" Width="150px">
                                                    <CollapseAnimation Duration="200" Type="OutQuint" />
                                                </telerik:RadComboBox>
                                                &nbsp;
                                                <asp:RequiredFieldValidator Display="Dynamic" InitialValue="Select State/Province"
                                                    ID="RequiredFieldValidator6" runat="server" ControlToValidate="cmbGLStats" ValidationGroup="Contract">
                                                    <asp:Image runat="server" ID="Image12" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
                                                </asp:RequiredFieldValidator>
                                                <asp:RequiredFieldValidator Display="Dynamic" InitialValue="" ID="RequiredFieldValidator7"
                                                    runat="server" ControlToValidate="cmbGLStats" ValidationGroup="Contract">
                                                    <asp:Image runat="server" ID="Image13" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
                                                </asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td width="20%" valign="middle" align="right">
                                    Geographic Scope
                                </td>
                                <td valign="top">
                                    <uc1:TerritoryPicker ID="ucTerritoryPicker" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="20%">
                                    &nbsp;
                                </td>
                                <td>
                                    <asp:Button ID="btnSaveContract" ValidationGroup="Contract" runat="server" OnClick="btnSaveContract_Click"
                                        CommandName="Save" Text="Save" Width="100px" CausesValidation="true" />&nbsp;<asp:Button
                                            CommandName="SaveExit" ID="btnSaveContractAndExit" ValidationGroup="Contract"
                                            runat="server" OnClick="btnSaveContract_Click" Text="Save & Exit" Width="100px"
                                            CausesValidation="true" /><asp:Button Style="margin-left: 4px;" ID="btnActivate"
                                                ValidationGroup="Contract" runat="server" OnClick="btnActivate_Click" Text="Active"
                                                Width="100px" CausesValidation="true" />&nbsp;<asp:Button OnClick="btnCancelContract_Click"
                                                    CausesValidation="false" ID="btnCancelContract" runat="server" Text="Exit" Width="100px" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>

Please help

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 20 Jul 2009, 05:59 AM
Hello pratik,

The general reasons for this error to appear are listed in this section of the RadAjax documentation:
http://www.telerik.com/help/aspnet-ajax/ajxcontenttype.html

Can you please verify that you do handle those cases in your code implementation? Additionally, check whether commenting temporary the RadAjaxManagerProxy and wrapping the tabstrip and multipage instances inside MS UpdatePanel produces the same exception.

Another thing you can try is using the Fiddler tool to determine the exact cause for the failure in the response parsing.

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
AJAX and Web 2.0
Asked by
pratik
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or