Sys.WebForms.PageRequestManagerParserErrorException

Last post 05-09-2008 11:42 AM by albertpascual. 5 replies.

Sort Posts:

  • Sys.WebForms.PageRequestManagerParserErrorException

    05-09-2008, 3:13 AM
    • Loading...
    • gyan_flip
    • Joined on 04-25-2008, 11:08 AM
    • Baghi - Bhojpur - Bihar - India
    • Posts 49

    I am using the MvcApplicationSample and in index.aspx page I have added following simple code: 

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Button ID="Button1" runat="server" Text="PostBack" OnClick="Button1_Click" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="updatePanel" DisplayAfter="1">
            <ProgressTemplate>Loading ...</ProgressTemplate>
        </asp:UpdateProgress>
     And the Button1_Click code is below: 
    protected void Button1_Click(object sender, EventArgs e)
            {
                Response.Write(TempData["count"].ToString());
            }
    When I run the application and click on the button, I am getting the following error: "Microsoft JScript runtime error: 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.
    Details: Error parsing near '|4|formAction||Home|'.
    " Do it mean we can not use Response.Write() when we are using <asp:ScriptManager> and <asp:UpdatePanel> or I am doing any mistake?
    Gyan
    Filed under:
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    05-09-2008, 4:03 AM
    • Loading...
    • kamii47
    • Joined on 05-26-2005, 12:04 PM
    • Karachi, Pakistan
    • Posts 1,080
    Kamran Shahid (MCP,MCAD,MCSD.NET)
    Sr. Software Engineer
    Netprosys Inc.
    www.netprosys.com
    [Microsoft Gold Certified Partner]
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    05-09-2008, 5:04 AM
    • Loading...
    • gyan_flip
    • Joined on 04-25-2008, 11:08 AM
    • Baghi - Bhojpur - Bihar - India
    • Posts 49

    I applied all the said options, but did not get any solutions. When i am using Response.Write("anything"); , then only i am getting this error. The following option is not giving exception, but the page is getting distorted.

    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>

    Gyan
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    05-09-2008, 5:24 AM
    Answer
    • Loading...
    • levib
    • Joined on 07-23-2007, 11:50 PM
    • Redmond, WA
    • Posts 50
    • AspNetTeam

    Postbacks are unsupported in our MVC framework.

  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    05-09-2008, 5:27 AM
    • Loading...
    • gyan_flip
    • Joined on 04-25-2008, 11:08 AM
    • Baghi - Bhojpur - Bihar - India
    • Posts 49

    I think its better to remove Response.Write(); from the code to remove the exception/error, as in the http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx. No other way to resolve the bug.

    Gyan
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    05-09-2008, 11:42 AM
Page 1 of 1 (6 items)