Link to home
Start Free TrialLog in
Avatar of smithmrk
smithmrkFlag for United States of America

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of Mrunal
Mrunal
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of smithmrk

ASKER

Thanks!

Mark