Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 20, 2012 09:05 AM by sureshtalla
Dec 14, 2012 07:20 PM|LINK
I am binding the Data to the GridView Control and When i click the Linkbutton in the GridView Control i am getting 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
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:GridView Id="gvDetails" runat="server">
<asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "up_user")) %>'
OnCommand="LinkButton1_Click" Text='<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "name")) %>'> </asp:LinkButton>
protected void LinkButton1_Click(Object sender, CommandEventArgs e)
if (e.CommandArgument != null)
Please Help Me.
Dec 15, 2012 04:31 AM|LINK
Can you try changing
<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "name")) %>
<%# Eval("name") %>
<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "up_user")) %>
<%# Eval("up_user") %>
Also, have you tried stepping through it with the debugger to see what it's doing and when the error occurs?
Dec 17, 2012 02:17 AM|LINK
It's hard to tell why according to your description. There are many other possible causes besides Response.Write.
The general idea is that the response should conform to certain format, for instance: "111|updatePanel|UpdatePanel1| .... ", otherwise, the ajax library won't be able to parse it. And an exception is thrown.
You may use Fiddler to view the view the traffic, and you will see what response is returned from the server with the help of it. Then, it'll be easier to find out the real cause.
This Error is coming because your Client side unable to Parse your Response.
Here is msdn Quote about this Error,
"If the response to an asynchronous postback returns without an error but there is an error processing the response in the client, the Sys.WebForms.PageRequestManagerParserErrorException is raised."
Possible Solution Here By, Eilon,
Dec 17, 2012 02:55 AM|LINK
Find LinkButton on
Dec 18, 2012 06:35 AM|LINK
It is not a good practice to use Response.Write from within an ASP.NET page in general. As UpdatePanels work by intercepting the page rendering process you are recieving the errors.
You can put the code to generate the data in an HTTPHandler or you can make the button a PostBackTrigger.
Dec 20, 2012 09:05 AM|LINK
Thanks for your reply,
But i don't know how to generate the data in an HTTPHandler
can you please help me,