In this session, I explained how to use sweet alert popups,
Add sweet alert script file and css file to the application
<html>
<head runat="server">
<title></title>
<script src="js/sweet-alert/sweet-alert.min.js"
type="text/javascript"></script>
<link href="css/sweet-alert.css"
rel="stylesheet"
type="text/css"
/>
<script>
function checkDelete() {
swal({
title: "Are you sure?",
text: "You
will not be able to recover this imaginary file!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete
it!",
closeOnConfirm: false
}, function () {
swal("Deleted!", "Your imaginary file has been deleted.", "success");
});
}</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:LinkButton ID="lbDelete"
Runat="server"
OnClientClick="checkDelete();return
false;" >Delete</asp:LinkButton>
</div>
</form>
</body>
</html>
Hi Karen, when i press "Yes, delete it" button, there isn't any postback of the page. Do you know how can I solve it?? Thank you so much!!
ReplyDeleteP.S.:I 'm replacing standard javascript confirm function with this one.
Even My Prob Is Same Please Suggest
ReplyDelete