Last post Dec 24, 2018 01:59 AM by Ackerly Xu
Dec 21, 2018 08:30 PM|Fernando SZ|LINK
Hi, I'm relatively new to asp.net and I've encountered a problem, I have a button that clicks on a file and generates another output, the problem is that when I click I want to show a simple gif of loading something that I have already achieved but the problem is that the response.end that the user sends the file to download is not done, I have investigated and so far I only do one thing or another, someone has an idea of how to do that?
Dec 24, 2018 01:59 AM|Ackerly Xu|LINK
Hi Fernando SZ,
It is not clear about how you write your code.
Could you show your whole code about downloading the file?
From your title, it seems your are using update panel to deal with files, the problem may be caused by this.
Please try to change the async mode of update panel to see whether the problem occurs.
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
<asp:Button runat="server" Text="Button" OnClick="Unnamed_Click" ID="btn" />
<asp:PostBackTrigger ControlID="btn" />
Please set the ControlId to the id of the button.
My code behind.
protected void Unnamed_Click(object sender, EventArgs e)
If it doesn't meet your requirement, please post your related code to let us reproduce your problem.