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

Sys.WebForms.PageRequestManagerParserErrorException

1 Answer 82 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Chandrasekhar
Top achievements
Rank 1
Chandrasekhar asked on 11 Aug 2011, 03:43 PM
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.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Aug 2011, 08:10 AM
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.
Tags
ComboBox
Asked by
Chandrasekhar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or