In my application the AsyncPostback trigger of update panel is not working in IE 9 and IE 10 but working in IE 8 and postbacktrigger is also working in all IE version.
This give error
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.
I have tried several thing before posting this issue :
<asp:UpdatePanel runat="server">
<ContentTemplate>
<cc:BinNumberMultiDropDown runat="server" TabIndex="3" ProgramTrue="true" ID="ddl_bin_number"
CssClass="multiselect">
</cc:BinNumberMultiDropDown>
<asp:RequiredFieldValidator ID="rfv_ddl_bin_number" runat="server" ControlToValidate="ddl_bin_number" ValidationGroup="vg_rate" Display="Dynamic"
SetFocusOnError="true"></asp:RequiredFieldValidator>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddl_program" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
Please suggest me with the solution
I also found that this error is appearing only in Winodws 8 systems
In my application the AsyncPostback trigger of update panel is not working in IE 9 and IE 10 but working in IE 8 and postbacktrigger is also working in all IE version.
This give error
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.
I have tried several thing before posting this issue :
<asp:UpdatePanel runat="server">
<ContentTemplate>
<cc:BinNumberMultiDropDown runat="server" TabIndex="3" ProgramTrue="true" ID="ddl_bin_number"
CssClass="multiselect">
</cc:BinNumberMultiDropDown>
<asp:RequiredFieldValidator ID="rfv_ddl_bin_number" runat="server" ControlToValidate="ddl_bin_number" ValidationGroup="vg_rate" Display="Dynamic"
SetFocusOnError="true"></asp:RequiredFieldValidator>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddl_program" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
Please suggest me with the solution
I also found that this error is appearing only in Winodws 8 systems
<asp:UpdatePanel ID="MainContainerUpdatePanel" ChildrenAsTriggers="false" UpdateMode="Conditional" runat="server">
Check that your browser definition files are updated on the server, there are a number of problems related to javascript postback handling that are caused by .Net incorrectly detecting new versions of IE. There are a number of hotfix patches to update the files, see Scott Hanselmann's blog for further details :
http://www.hanselman./blog/IE10AndIE11AndWindows81AndDoPostBack.aspx
and
http://www.hanselman./blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedjavascriptErrorOrMaintainFF5ScrollbarPosition.asp
I was facing same issue. I analysed the cause & find many good post about the cause of problem & how to resolve it. One of them is found on Eilon Lipton's blog:
Why do I keeping getting a PageRequestManagerParserErrorException?
Well, chances are you're doing one of the things mentioned in the error message. Here are the most mon reasons and why they don't work:
1.Calls to Response.Write():
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 (well, mostly...). This means thatUpdatePanel
can't encode the data in its special format.2.Response filters:
Similar to
Response.Write()
, response filters can change the rendering in such a way that theUpdatePanel
won't know.3.HttpModules: Again, the same deal as
Response.Write()
and response filters.4.Server trace is enabled: If I were going to implement trace again, I'd do it differently.
Trace
is effectively written out usingResponse.Write()
, and as such messes up the special format that we use forUpdatePanel
.5. Calls to Server.Transfer(): Unfortunately, there's no way to detect that
Server.Transfer()
was called. This means thatUpdatePanel
can't do anything intelligent when someone callsServer.Transfer()
. The response sent back to the client is the HTML markup from the page to which you transferred. Since its HTML and not the special format, it can't be parsed, and you get the error. How do I avoid getting aPageRequestManagerParserErrorException
?To start with, don't do anything from the preceding list! Here's a matching list of how to avoid a given error (when possible):
Calls to Response.Write(): Place an
<asp:Label>
or similar control on your page and set its Text property. The added benefit is that your pages will be valid HTML. When usingResponse.Write()
you typically end up with pages that contain invalid markup.Response filters: The fix might just be to not use the filter. They're not used very often anyway. If possible, filter things at the control level and not at the response level.
HttpModules: Same as response filters.
Server trace is enabled: Use some other form of tracing, such as writing to a log file, the Windows event log, or a custom mechanism.
Calls to Server.Transfer(): I'm not really sure why people use
Server.Transfer()
at all. Perhaps it's a legacy thing from Classic ASP. I'd suggest usingResponse.Redirect()
with query string parameters or cross-page posting.Another way to avoid the parse error is to do a regular postback instead of an
asynchronous postback
. For example, if you have a button that absolutely must do aServer.Transfer()
, make it do regular postbacks. There are a number of ways of doing this:
- The easiest is to simply place the button outside of any
UpdatePanels
. Unfortunately the layout of your page might not allow for this.- Add a
PostBackTrigger
to yourUpdatePanel
that points at the button. This works great if the button is declared statically through markup on the page.- Call
ScriptManager.RegisterPostBackControl()
and pass in the button in question. This is the best solution for controls that are added dynamically, such as those inside a repeating template.
I think you are using framework 4.0, there is some issues in framework 4.0 with windows 8, if possible you can try with converting you application in framework 4.5.
protected void Page_Load(object sender, EventArgs e) {
ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
scriptManager.RegisterPostBackControl(btn.Your-BUTTON-HERE');
//Further code goes here....
}
Put this and it will work or if you have multiple update panels ? let us know