To display Please Wait Screen
Add Following line in .aspx file
In head Tag
<head runat="server">
<title>Please Wait Screen</title>
<script language = "javascript">
function showPleaseWait()
{
document.getElementById('PleaseWait').style.display = 'block';
}
</script>
</head>
In Body Tag
<body>
<form id="form1" runat="server">
<div class="helptext" id="PleaseWait" style="display: none; text-align:right; color:White; vertical-align:top;">
<table id="MyTable" bgcolor="red">
<tr>
<td>
<b><font color="white">Please Wait...</font></b>
</td>
</tr>
</table>
<div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" onmouseup="showPleaseWait()"/>
Note: here "Please Wait Screen" display logic is on mouse up event, so whenever heavy task started on button click event, "Please Wait..." Message will be displayed.
I have read this interesting code on gridviewguy.com.
7 comments:
Wow...its pretty informative for me. thanks for sharing :) DotnetGuts Rocks :)
regards,
samiha esha
Wow...its pretty informative for me. thanks for sharing :) DotnetGuts Rocks :)
regards,
samiha esha
Thank u guys....really its very clear and informative....ur blog and the authors are rockers.......Awesome stuff guys....Keep it up....[Vallab]
Thanks Vallab
Very, very sharp. Much lighter weight and less complex than some other solutions I've seen. Best of all, it works (in .NET 3.5 anyways)!! Nice job!
workin' class joe
I was looking at couple of other approaches as well.I was impressed with this piece of code its light and crisp. I made a small modifications i used the OnClientClick instead of onmouseup
Nice Job Vallab
Regards
Guru Natti
Very good. I was looking for this kind of code. Thanks a lot. But this div is very small, i need like which need to lock my page entire until the operation get over. And also i m using master pages(asp.net 2.0). How to achieve it..
Regards
Poongodi
Post a Comment