Hi,
here is the sample code place this code page load event or where ever you want.
Button1.Attributes.Add("on
loggingin is image id.
Main Topics
Browse All TopicsHello
When the user submits a page .. I want to show an image on top of the page. The best example I found was this link:
http://nationalatlas.gov/n
I want to achive the similar effect in my program. How can I do this?
Thanks
Praveen
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi Jon500
Thanks for your great reply. One problem I'm having with this is ...
When I download any file to client PC, I'm using this code:
System.IO.FileInfo FileToDownLoad = new System.IO.FileInfo(FullPat
this.Page.Response.Clear()
this.Page.Response.Content
this.Page.Response.AddHead
this.Page.Response.WriteFi
this.Page.Response.Flush()
this.Page.Response.Close()
when I'm doing this, the DIV tag is still showing after the page is loaded. How to resolve the problem.
Thanks
You should render the Div tag with the visibility set to false. Be sure that you aren't caching the page.
If you still can't get it to work properly, please let me know how you are rendering the DIV tag on the page. Are you doing in from the code-behind? Or is it defined in the static HTML for the page?
Thanks,
-- Jon500
OK, so you should do a View Source to see if that DIV tag's visibility is set to true (or isn't set to False) after postback. If it is not set to false, then you have confirmed that the wrong DIV tag content is being sent to the browser. Then you have to look at caching, etc. Are you using frames?
Try a simple page with only the DIV tag and maybe a little static text. See if you can get that simple page to work. Once you get the DIV tag to be not visible after postback, then you've got a great solution to your initial question!
If you are still stuck, I'd want to see full source for HTML and code behind--but as small an example as possible to isolate the issue.
Regards,
-- Jon500
hello Jon
In my asp.net I have many web custom controls. For eg., I have a quey control which will execute SQL statements. When I do something on the page the div tag is showing fine, but when the query is exceuting in the Web custom control the div tag is not showing. So this is what I did ..
in the body tag of html : <body onbeforeunload="doHourglas
and this is the javascript function:
function doHourglass()
{
document.body.style.cursor
}
This is working just fine for normal page loads and when I'm using web custom controls. But when I download something to client PC like I said in my above post, the wait cursor is still showing even after the file is downloaded.
Please let me know how should I resolve this problem.
Thanks
Well, here's my opinion on this: Your original question had to do with submitting a page and getting some sort of message to show during postback. I offered a solution to that which works. Now you're talking about downloading a file from a page and wanting to show a message during the download. That's a different question--and requires a very specialized handler. Under the terms of this site, it's really not fair to get the answer to one question and then ask another within the same thread. Your second question (concerning the download) is complex, and should be posted as a new question. The method I gave you would need to "know" when the client download has finished so that it can remove the DIV tag from the screen--and, as I said, that's a bit tricky.
My suggestion is to close-out this question and re-post, but I don't know if you'll agree.
Regards,
-- Jon500
Business Accounts
Answer for Membership
by: Jon500Posted on 2005-08-30 at 17:35:35ID: 14790052
Hi,
Message/im ages/hourg lass.gif"> </asp:Imag e>
t("OnSubmi t", e();"); k("showWai tMessage", \n" + tyle.left= (IW-300)/2 ;\n" + .style.top =IH-100;// (IH-100)/2 ;\n" + tyle.visib ility=\"vi sible\";\n " + tyle.zInde x=99;\n" + waitmessag e\").style .left=(IW- 300)/2;\n" + waitmessag e\").style .visibilit y=\"visibl e\";\n" + waitmessag e\").style .zIndex=99 ;\n" + (IW-300)/2 ;\n" + ility=\"sh ow\";\n" + x=99;\n" +
I like the approach where you have an invisible DIV tag that contains your "wait image". Upon page submission/postback, you show that DIV tag client-side--before the postback occurs.
Here are steps:
1) Create your DIV tag. For example (this uses an hourglass image that you can substitute with your own image file in place of hourglass.gif):
<div id="waitmessage" style="Z-INDEX:-1; LEFT:0px; VISIBILITY:hidden; WIDTH:300px; POSITION:absolute; TOP:200px; HEIGHT:100px">
<table border="2" style="BORDER-COLLAPSE: collapse" width="300" height="100" cellspacing="1"
bgcolor="#ffffff" bordercolor="#000000">
<tr>
<td align="right" bordercolor="#ffffff">
<asp:Image id="imgHourglass" runat="server" ImageUrl="../Controls/Wait
</td>
<td align="center" class="bblrg" width="239">Your submission<br>
is being processed.<br>
<br>
Please wait a moment...</td>
</tr>
</table>
</div>
2) Add code to your the ASP.NET page's PreRender function:
private void Feedback_PreRender(object sender, System.EventArgs e)
{
// this requires a DIV tag called "waitmessage" in order to work
System.Web.UI.Page p = this;
p.RegisterOnSubmitStatemen
"javascript:showWaitMessag
p.RegisterClientScriptBloc
"<script>\n" +
"function showWaitMessage()\n" +
"{\n" +
"var IW = window.innerWidth ? window.innerWidth : document.body.clientWidth;
"var IH = self.outerheight;\n" +
"self.scrollTo(0, 0);\n" +
"if( document.all )\n" +
"{\n" +
" document.all.waitmessage.s
" //document.all.waitmessage
" document.all.waitmessage.s
" document.all.waitmessage.s
"}\n" +
"else if( document.getElementById )\n" +
"{\n" +
" document.getElementById(\"
" document.getElementById(\"
" document.getElementById(\"
"}\n" +
"else\n" +
"{\n" +
" document.waitmessage.left=
" document.waitmessage.visib
" document.waitmessage.zInde
"}\n" +
"}\n" +
"</script>\n");
}
Let me know how this works for you!
Regards,
-- Jon500