ASP.net (2005) - Hide Update Panel and controls in it while updating

OK, I hope someone can help with this.
I have an update panel with tables, controls, etc.

When the page loads I have timer so the page calling the new page doesn't hang while the data loads...so I have a timer set to load the data after a half second.  This all works fine, the problem seems to be when the page loads that 1/2 second shows the stuff in the UpdatePanel before it disappears based on the javascript I have setup (see below).  My question is why does it show for that 1/2 second and how can I hide it until it has finished loading?

    <script type="text/javascript">
function pageLoad()
{
    Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequestHandler);
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);
}
function beginRequestHandler(sender, args)
{
    document.getElementById('<%=UpdatePanel_BillingCodes.ClientID %>').style.display="none";
}
function endRequestHandler(sender, args)
{
  </script>
    document.getElementById('<%=UpdatePanel_BillingCodes.ClientID %>').style.display="";
}


Mark
smithmrkAsked:
Who is Participating?

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

x
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.

MrunalCommented:
Hi smithmrk,

You can try one solution:
You have trigger points from where you have to update the UpdatePanel.
If you want to hide inner contents of that panel then you can click event (client-click) to that trigger element (like button, link, etc).
On client click call JavaScript function in which you can set inner contents as "Display:None".

Hope this helps you.

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
smithmrkAuthor Commented:
Thanks!

Mark
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
ASP.NET

From novice to tech pro — start learning today.