I have a asp.net button which is runat server. there is a function handle the postback of button onclick.
How can I display a "loading ..." word in the page before going the server procedure ...?
I have a asp.net button which is runat server. there is a function handle the postback of button onclick.
How can I display a "loading ..." word in the page before going the server procedure ...?
Look at OnClientClick, you can add a call to a js function, or inline JS there.
Or you can wire into the button with JQuery and display a modal dialog with an async callback.
Hook up OnClientClick to some javascript function that returns true or false. The postback occurs if it returns true else it is canceled.
<asp:Button id="MyButton" runat="Server" Text="Close"
OnClientClick="return PromptClose();"/>
<script type="text/javascript">
function PromptClose(){
return prompt("Do you really want to close this window?");
}
</script>