Do I need to raise an event?

Hi everyone,

I've written an page that allows for a spreadsheet to be selected (browsed for) and imported into our SQL database. That works fine - however as it takes about 10 minutes to process and upload all the data I was hoping to display a graphic to the user to show that the data is loading.

When the import button is clicked, obviously a postback is raised, I display my graphic (or so I thought) using an image control with runat=server and the import goes ahead... however, the graphic never gets displayed - it goes striaght into the import code.  I presume the grapic hasn't been rendered on the page?

So my question is, how can I get the graphic to render before it hits the import code? Do I need to raise an event or something?  When the import finished I then hide the image.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You must use Javascript. It is display graphic before processing is hand on server. Graphic is displeyd as last action before postback, after postback page is reloaded and wait message disappears.
Try use this:
    <script type="text/javascript">
        function PleaseWait()
            // make the mouse cursor into the "wait" hourglass
   = "wait";
            document.getElementById("lresult").innerText = ""
            // show the please wait div
                var message = document.getElementById( "PleaseWait" );
                if (message) = "block";

            // allow the form to post back
            return true;
    <style type="text/css">#PleaseWait {
      BORDER-RIGHT: #000 1px solid; PADDING-RIGHT: 20px; BORDER-TOP: #000 1px solid; DISPLAY: none; PADDING-LEFT: 20px; BACKGROUND: #ffff9b; LEFT: 50px; PADDING-BOTTOM: 20px; BORDER-LEFT: #000 1px solid; WIDTH: 200px; PADDING-TOP: 20px; BORDER-BOTTOM: #000 1px solid; POSITION: absolute; TOP: 50px

<form onsubmit="PleaseWait()" runat="server">
        <div id="PleaseWait" style="LEFT: 51px; TOP: 37px">
            <p style="TEXT-ALIGN: center">
                Please wait....

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
obyapkaAuthor Commented:
At your suggestion I've created a DIV block around the image with display style of none, and I've tied the Update button to some javascript, so that when its precessed it displays the image in a DIV block - all that is great, however the image is an animated GIF which doesn't animate when the IE status bar is slowly growing!!  Does this happen with all GIF files or is there a way around it?

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.