What I like to do is hide the submit button and show a message to notify the user that the action is in progress.
This is my front-end code. I have an image button that OnClick is submits an order.
<asp:ImageButton ID="btnPlaceOrder" runat="server" Visible="False" OnClick="btnPlaceOrder_Click" />
<div id="process_message" style="display:none;">
<p> Processing your order...</p>
</div>
The code-behind looks like this:
btnPlaceOrder.Attributes.Add("onclick", "this.disabled = true;this.hide(); $('process_message').show();" + ClientScript.GetPostBackEventReference(btnPlaceOrder, null) + ";");
No comments:
Post a Comment