Sys.WebForms.PageRequestManagerParserErrorException

2 posts, 0 answers
  1. Chandrasekhar
    Chandrasekhar avatar
    6 posts
    Member since:
    Aug 2011

    Posted 11 Aug 2011 Link to this post

    Hi,

    We are getting javascript error while working with asp.net dropdown inside the telerik . OnselectIndex change of dropdown getting javascript error "Sys.WebForms.PageRequestManagerParserErrorException".
     

    Please verify the below sample code and provide the resolution.

    Thanks InAdvance.

    aspx code :

    <

     

     

    form id="form1" runat="server">

     

     

     

    <telerik:RadScriptManager ID="ScriptManager" runat="server" />

     

     

     

    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">

     

     

     

    <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="740px">

     

     

     

    <Items>

     

     

     

    <telerik:RadPanelItem Expanded="True" Text="Step 1: Account Information" runat="server" Selected="true">

     

     

     

    <Items>

     

     

     

    <telerik:RadPanelItem Value="AccountInformation" runat="server">

     

     

     

    <ItemTemplate>

     

     

     

     

    <asp:DropDownList ID="ddTest" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddTest_OnSelectedIndexChanged">

     

     

     

    <asp:ListItem>First</asp:ListItem>

     

     

     

    <asp:ListItem>Second</asp:ListItem>

     

     

     

    <asp:ListItem>Third</asp:ListItem>

     

     

     

     

    </asp:DropDownList>

     

     

     

    </ItemTemplate>

     

     

     

    </telerik:RadPanelItem>

     

     

     

    </Items>

     

     

     

    </telerik:RadPanelItem>

     

     

     

    </Items>

     

     

     

     

    </telerik:RadPanelBar>

     

     

     

    </telerik:RadAjaxPanel>

     

     

     

     

    </form>

     


    C# Code :

    protected void ddTest_OnSelectedIndexChanged(object sender , Eventargs e)
    {
       Response.write("test");
    }

    Even after removing response.write in the  code part. getting same javascript issue.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 12 Aug 2011 Link to this post

    Hello Chandrasekhar,

    By calling Response.Write() directly you are bypassing the normal rendering mechanism of ASP.NET controls. The bits you write are going straight out to the client without further processing. This means that UpdatePanel can't encode the data in its special format.
    For further information you can check the following article
    Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it .

    Thanks,
    Princy.
Back to Top