Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,
Recently I came across a task in which I used a update panel and a update progress. Everything is working fine except the last task when the update panel is updated is not taking place. For eg: I am downloading some data. For that I am making user to see the update panel with the progress indicator image. When the data is collected and written in the desired format and it has to come in a dialogue box over the screen, nothing happens. Neither I am able to show user a confirmation message after the finishing the update process. Am i missing something ??? And one more thing during the panel is updated I freeze the GUI using a div and opacity of the div. Is it because of that ? Here is my HTML mark up:-
ASP.NET
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                   <ContentTemplate>
                               <asp:Button ID="btnDwnload" runat="server" OnClick="btnDwnload_Click" Style="text-align: center"
                                   Text="Download" UseSubmitBehavior="false" />
                                   </ContentTemplate>
               </asp:UpdatePanel>
                           </td>
                           <td style="text-align: center">
                           <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel2">
                           <ProgressTemplate>
                           <div style="top: 0px; height: 1000px; background-color: White; opacity: 0.75; filter: alpha(opacity=55);
                           vertical-align: middle; left: 0px; z-index: 999999; width: 1500px; position: absolute;
                           text-align: center;">

                           </div>
                               <asp:Image ID="Image2" runat="server" ImageUrl="~/images/indicator.gif" Width="100px" />
                               <br />
                               Processing...
                           </ProgressTemplate>
                       </asp:UpdateProgress>



Please help...
Posted
Updated 27-May-12 20:03pm
v3
Comments
Technoses 28-May-12 2:17am    
where is your dialogbox code??
whate is your CS Code??
Taresh Uppal 28-May-12 2:53am    
This is how my file (.xls)comes to the user in dialogue box


if (!string.IsNullOrEmpty(dataToExport.ToString()))
{

HttpContext.Current.Response.Clear();

HttpContext.Current.Response.ContentType = "application/ms-excel";
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=offline_data.xls");

HttpContext.Current.Response.Write(dataToExport.ToString());
HttpContext.Current.Response.End();
}
Taresh Uppal 28-May-12 3:00am    
and my cs coding is quite lengthy ...I simply get values from user on button click event of download button and get the records into datatable from DB and than write the data table into .xls file and gv it to the user in dialogue box. simple. Earlier when i was not using ajax the code was working fine... when my boss asked me to implement this functionality after that I am not able to get dialogue box. Simply to say when my file is ready and can be shown to the user update panel should allow it to open the dialogue box but it is not happening.

1 solution

Check this answer
Response.End() throwing error[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900