So you want to change the message your UpdateProgress control displays in response to certain events on the page? I really had to dig deep on google to find what I was looking for. Some powerpoint presentation shed the light: You have to do it with clientscript.
<script language="javascript">
// tell the page you want your custom BeginRequest function to run whenever a postback happens
var manager = Sys.WebForms.PageRequestManager.getInstance();
manager.add_beginRequest(BeginRequest);
function BeginRequest(sender, args) {
var postBackElement = args.get_postBackElement();
// use the client ID of the server control initiating the postbacl
// i have it hardcoded but you could do <%=yourbutton.clientID%> within the javascript
if (postBackElement.id == 'ctl00_CPH1_yourbutton') {
$get('ctl00_CPH1_progmsg').innerHTML = "<center><font face=arial>Please Wait. We\'re doing whatever clicking yourbutton does.</font><BR><BR><img hspace=10 align=absmiddle src='/images/busy.gif' alt='Sorting...' /></center>"
}
else
{
$get('ctl00_CPH1_progmsg').innerHTML = "<center><font face=arial>Please Wait. This is the default message.</font><BR><BR><img hspace=10 align=absmiddle src='/images/busy.gif' alt='Searching...' /></center>"
}
}
</script>
Then, you'll need a label in your updateprogress ProgressTemplate, that corresponds to the label you're setting the innerHTML for:
<ProgressTemplate>
<asp:Label ID="progmsg" runat="server"></asp:Label>
</ProgressTemplate>
</asp:UpdateProgress>