JB,
Instead of having the user call the slow-loading page directly, you
will need to create an intermediate page. You pass the URL (with
querystring) of the slow-loading page to the intermediate page, which
in turn calls the slow-loading page using javascript. In the interim,
it does something (shows "progress bar", message or animation).
I have attached some example script which should help you. The initial
calling page is called orderstart.aspx. The intermediate page is
pageload.aspx and the slow-loading page is called ordercomplete.aspx
(not shown here directly). This code is from an asp.net "Black belt"
presentation by INETA.
Bill E.
Hollywood, FL
________________________________
orderstart.aspx.vb
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Server.Transfer("PageLoad.aspx?Page=ordercomplete.aspx?partnumber=" &
TextBox1.Text, True)
End Sub
________________________________
pageload.aspx
<HTML>
<HEAD>
<title>PageLoad</title>
<script language="javascript">
var iLoopCounter = 1;
var iMaxLoop = 6;
var iIntervalId;
function BeginPageLoad() {
location.href = "<%= Request.QueryString("Page")%>";
iIntervalId =
window.setInterval("iLoopCounter=UpdateProgressMeter(iLoopCounter,
iMaxLoop)", 500);
}
function EndPageLoad() {
window.clearInterval(iIntervalId);
ProgressMeter.innerText = "Page Loaded -- Not Transferring";
}
function UpdateProgressMeter(iCurrentLoopCounter, iMaximumLoops) {
iCurrentLoopCounter += 1;
if (iCurrentLoopCounter <= iMaximumLoops) {
ProgressMeter.innerText += ".";
return iCurrentLoopCounter;
}
else {
ProgressMeter.innerText = "";
return 1;
}
}
</script>
</HEAD>
<body onload="BeginPageLoad()" onunload="EndPageLoad()">
<form id="Form1" method="post" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="99%"
height="99%" align="center"
valign="middle">
<tr>
<td align="center" valign="middle">
<font color="navy" size="7">
<span id="MessageText">Processing Order -- Please
Wait</span>
<span id="ProgressMeter"
style="WIDTH:25px;TEXT-ALIGN:left"></span>
</font>
</td>
</tr>
</table>
</form>
</body>
</HTML>