When we use the UpdateProgress progress bar today, we find that the progress bar is displayed during partial page updates, while the UpdatePanel is not hidden, which looks like the page is messy. To achieve the effect of the problem, you can manually write the code. The code snippet is placed in <asp: ScriptManager ID = "ScriptManager1" runat = "server">
</Asp: ScriptManager>
The following is recommended.
The code snippet is as follows:
<Script type = "text/javascript" language = "javascript">
Sys. WebForms. PageRequestManager. getInstance (). add_beginRequest (BeginRequestHandler );
Sys. WebForms. PageRequestManager. getInstance (). add_endRequest (EndRequestHandler );
Function BeginRequestHandler (sender, args)
{
Document. getElementById ("updated container ID"). style. display = "none ";
}
Function EndRequestHandler (sender, args)
{
Document. getElementById ("updated container ID"). style. display = "block ";
}
</Script>
This is OK! Haha!