I did a lot of searching and found 3 or 4 different ways of doing this but the one below was far and away my favorite. Basically, you can just attach a javascript method to the beginRequest and endRequest of the AJAX call.
<script type="text/javascript">
//add event handlers to the search UpdatePanel
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest( startRequest );
Sys.WebForms.PageRequestManager.getInstance().add_endRequest( endRequest );
function startRequest( sender, e ) {
//hide the update panel during the AJAX call
document.getElementById(
'<%=upSearchResults.ClientID%>').style.display = 'none';
//disable search button during the AJAX call
document.getElementById(
'<%=cmdSearch.ClientID%>').disabled = true;
}
function endRequest( sender, e ) {
//show the update panel once the AJAX call has completed
document.getElementById(
'<%=upSearchResults.ClientID%>').style.display = '';
//re-enable the search button once the AJAX call has completed
document.getElementById(
'<%=cmdSearch.ClientID%>').disabled = false;
}
</script>