Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed
<p>I have a grid view on my page and i want to export it to the Excel Sheet,
Below is the code i had written to do this task, here i am already passing the dataset to the method to bind the grid and btnExcelExport is the button which will export the Grid Content in to Excel Sheet :-</p>

<pre><code>private void BindGridView(DataSet ds)
    {
        if (ds.Tables.Count &gt; 0)
        {
            if (ds.Tables[0].Rows.Count &gt; 0)
            {
                GVUserReport.DataSource = ds;
                GVUserReport.DataBind();
                btnExcelExport.Visible = true;
            }
        }

    }

    protected void btnExcelExport_Click(object sender, EventArgs e)
    {
        Response.Clear();
        Response.AddHeader("content-disposition", "attachment;filename=FileName.xls");
        Response.Charset = "";
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.ContentType = "application/vnd.xls";
        System.IO.StringWriter stringWrite = new System.IO.StringWriter();
        System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
        GVUserReport.RenderControl(htmlWrite);
        Response.Write(stringWrite.ToString());
        Response.End();

    }

    public override void VerifyRenderingInServerForm(Control control)
    {
        return;
    }
</code></pre>

<p>Now when i m debugging i found that the grid is binded sucessfully but when trying to export it to Excel , i m getting this Error "Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed."</p>
