Wait while loading.....

J

Jonas Nilsson

How can i show a "Wait while loading..." text on my aspx page while loading
data into a datagrid from a database.

/Jonas
 
J

Jerry III

You pretty much can't as you cannot control what the browser shows to the
user while it's loading a page. There are some things you can do (use a
redirect page or send part of the response first by flushing the response
object) but none are 100% guaranteed to work.

Jerry
 
R

Richard

I just had the same requirement and it works great:

sub Page_Load()
Response.Write("<br><div align='center' id=myMessage style='font-family
Tahoma; font-size: 18; color:Red'>Loading report, please wait...</div>")
Response.flush
End Sub

sub DisplayReport()

'-- code that reads database here.....

End Sub

<html>
<head>
</head>
<body onload="clearWaitMessage();" >
<center>
<p>

<%Call DisplayReport%>
</p>

</center>
</body>
</html>

<SCRIPT LANGUAGE=JavaScript>
<!--function clearWaitMessage() {
myMessage.innerHTML = "";
}
//-->
</SCRIPT>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top