G
Guest
I have an aspx page that can take a minute or so to load because it loads
images from a database. I want to open a window and show a "Please Wait"
message page at the start and close it when the page is ready to load with
Response.Write. I have opened a thread to do it but it doesn't work. Any
suggestions?
Here is the relevant part of my code:
=================================
public class Images : System.Web.UI.Page
{
public static void NewThread()
{
Images wb = new Images();
wb.WaitBox();
}
public void WaitBox()
{
string waitString="" ;
waitString="<script
language=\"javascript\">\n\twaitWindow=window.open(\"plswait.htm\",
\"WaitWindow\",
\"width=600,height=450,toolbar=no,status=no,menubar=no,resizable=no,scrollbars=no\");\n" +
"\twaitWindow.location=\"plswait.htm\";\n</script>";
Response.Write(waitString);
}
private void Page_Load(object sender, System.EventArgs e)
{
Thread thread = new Thread(new ThreadStart(NewThread));
thread.Start();
//
// Build htmlString here
//
//
thread.Abort();
Response.Write(htmlString);
}
}
=============================
Thanks,
Evan Hicks
images from a database. I want to open a window and show a "Please Wait"
message page at the start and close it when the page is ready to load with
Response.Write. I have opened a thread to do it but it doesn't work. Any
suggestions?
Here is the relevant part of my code:
=================================
public class Images : System.Web.UI.Page
{
public static void NewThread()
{
Images wb = new Images();
wb.WaitBox();
}
public void WaitBox()
{
string waitString="" ;
waitString="<script
language=\"javascript\">\n\twaitWindow=window.open(\"plswait.htm\",
\"WaitWindow\",
\"width=600,height=450,toolbar=no,status=no,menubar=no,resizable=no,scrollbars=no\");\n" +
"\twaitWindow.location=\"plswait.htm\";\n</script>";
Response.Write(waitString);
}
private void Page_Load(object sender, System.EventArgs e)
{
Thread thread = new Thread(new ThreadStart(NewThread));
thread.Start();
//
// Build htmlString here
//
//
thread.Abort();
Response.Write(htmlString);
}
}
=============================
Thanks,
Evan Hicks