This is going to have to be implemented using JavaScript (not C# as ssnaik84 as suggested).
How this is implemented depends on whether or not your page is using Ajax. If it's using Ajax (UpdatePanels) then you could display the message when the PageRequestManager is in it's beginRequest event...then hide the message when the endRequest event occurs.
If you aren't using Ajax then you should just display the message during something like the
onbeforeunload event.
Displaying the message is pretty easy.
Just add an ASP.NET Label or Panel to the page and give it a style="display:none"...then in the JavaScript change the style to display:block.
Eg (only works with no Ajax):
-
window.onbeforeunload=showMessage;
-
showMessage(){
-
var message = document.getElementById('<%=Message.ClientID %>');
-
if(message)
-
{
-
message.style.display='block';
-
}
-
}