Introduction
In this article i will tell you about how we can display a confirmation popup dialog using simple JavaScript code.
Practice :
Here i am sharing my aspx page code for this task.
<asp:Button ID="BtnSave" runat="server"
OnClientClick="return confirm('Are you sure you want to save these changes?');"
OnClick="BtnSave_Click" Text="Save">
</asp:Button>
Same code used for Deletion but here i am using Link-Button for your better understanding about all the aspects of asp controls.
<asp:LinkButton ID="LinkBtnDelete" runat="server"
OnClientClick="if (!confirm('Are you sure you want delete?')) return false;"
CommandName="Delete">Delete
</asp:LinkButton>
0 comments:
Post a Comment