Confirm postback on clien button click ASP.NET

kagami

New Member
\[code\]<asp:Button runat="server" ID="btnUserDelete" Text="Delete" CssClass="GreenLightButton" OnClick="BtnUserDelete_Click" OnClientClick="return UserDeleteConfirmation();" meta:resourcekey="BtnUserDeleteResource1" />\[/code\]I have tried:\[code\]function UserDeleteConfirmation() { if (confirm("Are you sure you want to delete this user?")) return true; else return false;}\[/code\]and \[code\]function UserDeleteConfirmation() { if (confirm("Are you sure you want to delete this user?")) { __doPostBack(btnUserDelete, ''); } return false; }\[/code\]And none of them works.
 
Back
Top