What you can do is have the client side code run first, display the wait message, or icon, or even some kind of animated gif.
So, I might have this button click:
So, when I click the above button, the code behind will run, but ALSO the client side code to display the gif. So when I click the button, you will see this:
it is a animated gif.
and I don't even have to turn it off when done, since the button does a post-back, and when the screen re-plots, the hidden gif + div will go away all on its own.
So, you you need to set/change the display client side, since when you click the button, the web page doe travel up to the server - and REMAINS there until the code behind is done. When code is done, ,then the whole page travels back down to the client side - replots and re-displays in the browser.
So, you need to start a display or whatever (even text box with please wait....) client side.