I have an asp.net button which is runat server, there is a function handle that postback of button onclick.
How can I display a "loading ..."
word in the page before going to the server procedure?
How to Raise a Postback from JavaScript? To do this, we need to just call the __doPostBack() function from our javascript code. When the above function is called, it will raise a postback to server.
PostBack is the name given to the process of submitting an ASP.NET page to the server for processing. PostBack is done if certain credentials of the page are to be checked against some sources (such as verification of username and password using database).
postback=true) - you can then get the page url with window.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With