DarkWorlds
Technical User
The site I’m working on gets a local list, and then has to compare it to a list on a server elsewhere. So time will be taken up. So I wanted to implement a "Please Wait" thing.
My current setup seems to work fine. I get the “Please Wait” but it still goes after the operation is complete. That’s where the problem lays.
All the code the "Please Wait" can be seen here:
Thats the code im using in the HTML section.
As for whats calling it, its a button. When the button is hit, dataset is created. After the dataset is created it then is sent to the following code to be made into an excel file
So you get the option to save it or open it. The problem is that the operation is complete but the "please wait" is still going on. The only way to stop it is the refresh the page, or kill it. It’s like the please wait thing doesn’t get the single that the process is complete.
I look forward to your responses.
My current setup seems to work fine. I get the “Please Wait” but it still goes after the operation is complete. That’s where the problem lays.
All the code the "Please Wait" can be seen here:
Code:
<span onclick="busyBox.Show();"><asp:button id="btnDownload" runat="server" Text="Download File"></asp:button></P>
</SPAN><iframe id="BusyBoxIFrame" ondrop="return false;" name="BusyBoxIFrame" frameBorder="0" scrolling="no">
</iframe>
<SCRIPT>
var busyBox = new BusyBox("BusyBoxIFrame", "busyBox", 4, "gears_ani_", ".gif", 125, 147, 207);
</SCRIPT>
Thats the code im using in the HTML section.
As for whats calling it, its a button. When the button is hit, dataset is created. After the dataset is created it then is sent to the following code to be made into an excel file
Code:
public static void ExcelConvert(DataSet ds, HttpResponse response)
{
string startDate = System.DateTime.Today.ToShortDateString();
string endDate = System.DateTime.Today.AddDays(7).ToShortDateString();
response.Clear();
response.Charset = "";
response.ContentType = "application/vnd.ms-excel";
StringWriter stringWrite = new StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
DataGrid dg = new DataGrid();
dg.DataSource = ds.Tables[0];
dg.DataBind();
dg.RenderControl(htmlWrite);
response.Write("This list is good from " + startDate + " to " + endDate);
//response.Write(" ");
response.Write(stringWrite.ToString());
response.End();
}
So you get the option to save it or open it. The problem is that the operation is complete but the "please wait" is still going on. The only way to stop it is the refresh the page, or kill it. It’s like the please wait thing doesn’t get the single that the process is complete.
I look forward to your responses.