Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6360973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:43:01+00:00 2026-05-24T23:43:01+00:00

I am using Master page for my page. in this page i have gridview

  • 0

I am using Master page for my page. in this page i have gridview inside updatepanel . I want to export that GridView to Excel. while doing this i am getting error Like this

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 ‘

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 ‘

eventhough i added following :

EnableEventValidation ="false"

<asp:AsyncPostBackTrigger ControlID="btn_export" EventName="Click" />

My markup:

<%@ Page Language="C#" MasterPageFile="~/C2SFAMaster.master" AutoEventWireup="false"     EnableEventValidation ="false"   CodeFile="GDNReport.aspx.cs" Inherits="GDNReport" Title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit, Version=1.0.11119.21057, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 
<table>
<tr>
<td>
<TABLE class="TableBgColor">
<TBODY>
<TR class="TableHDColor"><TD colSpan=6>Sample Dispatch Note Report</TD></TR>
<TR>
    <td>Select Fs</td>
    <td>
        <asp:DropDownList ID="cmb_fs" runat="server" Width="200px" AppendDataBoundItems="True" SkinID="DropDowns">
            <asp:ListItem Value="-99">--------------------ALL------------------</asp:ListItem>
        </asp:DropDownList></td>
    <td>DateFrom</td>
    <td>
        <asp:TextBox id="txt_frdate" runat="server" SkinID="Textboxs" />
        <cc1:CalendarExtender id="CalendarExtender1" runat="server" TargetControlID="txt_frdate" Format="d/MM/yyyy" />
    </td>
    <td>DateTo</td>
    <td>
        <asp:TextBox id="txt_todate" runat="server" SkinID="Textboxs" />
        <cc1:CalendarExtender id="CalendarExtender2" runat="server" TargetControlID="txt_todate" Format="d/MM/yyyy" />
    </td>
</TR></TABLE> 
</td>
</tr>
<tr>
    <td align ="center" >
        <asp:Button ID="btn_view" runat="server" Text="View" OnClick="btn_view_Click" OnClientClick="return viewcheck();" CssClass="Button" />
    </td>
</tr>
<tr>
<td align="center"> 
    <asp:UpdatePanel id="swpnl" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:GridView ID="gdview" runat="server" OnRowDataBound="gdview_RowDataBound"    OnRowCreated="gdview_RowCreated" style="position: relative" />
        </ContentTemplate>
        <triggers>
            <asp:AsyncPostBackTrigger ControlID="btn_view" EventName="Click">    </asp:AsyncPostBackTrigger>
            <asp:AsyncPostBackTrigger ControlID="btn_export" EventName="Click" />
        </triggers>
    </asp:UpdatePanel>
    <asp:Button ID="btn_export" runat="server" CssClass="Button" OnClick="btn_export_Click" Style="position: relative" Text="Export To Excel" />    
</td></tr>
</table>
</asp:Content>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:43:01+00:00Added an answer on May 24, 2026 at 11:43 pm

    I am guessing that in the updatepanel request you are trying to write the data to the response stream.

    I don’t think this will work very well, as it will be trying to add a write response to the update panel handler which won’t like you trying to write a file to it, not that I have ever tried so it may work.

    You are better off doing this with a normal postback; or if it must be async send them a redirect to another handler that writes the file

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know we've done this before in another .aspx page that's using this master
I have a view using a master page that contains some javascript that needs
I am using one master page.In that I am registering java scripts and checking
I have a Visual Studio 2010 project with a Master Page that works fine.
I have an ASP.NET MVC application I'm building and I'm using a Master page.
I have implemented master pages using this example How to implement a status bar
I have this div in my master page. <div id=UICancelChanges title=Are you sure? style=display:
I have a asp.net page which is inherited from a master page .I want
I have an ASP.NET 4 web app. I am using a Master Page Site.Master.
I have a gridview that I have added a checkbox column using a templatefield

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.