Last post Nov 28, 2009 02:58 PM by ONLINE SUPERTRAMP
May 27, 2008 03:24 PM|swaino|LINK
I have an UpdateProgress AJAX spinner which works ok when any updates occur within my UpdatePanel.
However I have an export button which carries out a Response.Redirect to another page which exports a datagrid into excel.
The problem is, a dialog pops-up which says should I save the excel document, open it or cancel. If I
cancel, the dialog is dismissed but the updateprogress spinner within the originating button's updatepanel continues to spin, incorrectly giving the impression the application is busy.
I'm not a AJAX guru, but I've got a feeling the update panel isn't receiving a STOP or end request message to stop the update progress panel from showing busy.
Does anyone know how to either 1) prevent this from happening 2) explicitly send a message or something similar to the updateprogress on dismissing the Open/Save dialog??
May 28, 2008 03:25 AM|chetan.sarode|LINK
It is not a good practice to use Response.Write or server.execute from within an ASP.NET page in general. As UpdatePanels work by intercepting the page rendering process you are recieving the errors.
You can put the code to generate the data in an HTTPHandler or you can make the button a PostBackTrigger.
Because of the way updatepanels manage the DOM elements within them, you cannot use Response.Write() with them.
May 28, 2008 08:13 AM|swaino|LINK
I'm not using a Response.Write, I'm using a Reponse.Redirect from the AJAX page, to another page which then calls the following code in the Render routine of the page:
Response.ContentType = "application/ms-excel"
Response.ContentEncoding = System.Text.Encoding.UTF8
If I cancel the dialog to Open/Save, I'm back to the AJAX page with the UpdateProgress spinner showing activity.
How can I prevent the UpdateProgress/AJAX spinner from doing this?
May 30, 2008 05:18 AM|Nai-Dong Jin - MSFT|LINK
class. In the beginRequest event handler, display the DOM element that represents the UpdateProgress control. In the endRequest event handler, hide the element.
For more information, see:
Nov 28, 2009 02:58 PM|ONLINE SUPERTRAMP|LINK
I came across the same problem and created a simple solution.
I had a SAVE button within my UpdatePanel and used the Respose.Redirect in the associated Click event handler. This caused the UpdateProgress control to display its contents but then to not dissapear once the file had downloaded. The file downloaded was
specified by a two asp.net DropDownLists within the UpdatePanel.
I removed the asp.net button...
and replaced it with..
Whenever the form was submitted I simply changed the onclick attributes value in the AJAX postback to the url of the page that would return the file...
protected void Search()
"window.location='DownloadTextFile.aspx?YEAR=" + DropDownListSearchYear.SelectedItem.Value +
"&MONTH=" + DropDownListSearchMonth.SelectedItem.Value +
This worked a treat and caused the UpdateProgress control to not show anything at all.
Hope this helps anyone else who comes across this issue.
UpdateProgress will not dissapear after file download