<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Bootstrap Popup message</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<script type="text/javascript">
function getConfirmation(sender, title, message) {
$("#ModalTitle").text(title);
$("#ModalMsg").text(message);
$('#modalPopUp').modal('show');
return false;
}
</script>
<style type="text/css">
i {
color: #ffffff;
}
.btnRound {
border-radius: 15px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="modalPopUp" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<span id="ModalTitle"></span>
</h4>
</div>
<div class="modal-body">
<p>
<span id="ModalMsg"></span>.
</p>
</div>
<div class="modal-footer">
<div class="col-md-3 col-md-offset-6 col-sm-4 col-sm-offset-4 col-xs-4 col-xs-offset-3">
<div class="form-group">
<div class="has-feedback">
<asp:Button ID="btnNo" data-dismiss="modal" CssClass="btn btn-danger btnRound" Width="100%" runat="server" Text="No" />
<i class="glyphicon glyphicon-remove form-control-feedback"></i>
</div>
</div>
</div>
<div class="col-md-3 col-sm-4 col-xs-5">
<div class="form-group">
<div class="has-feedback">
<asp:Button ID="btnYes" CssClass="btn btn-success btnRound" Width="100%" runat="server" Text="Yes, do" />
<i class="glyphicon glyphicon-ok form-control-feedback"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br />
<div class="col-md-2 col-md-offset-5 col-sm-2 col-sm-offset-5 col-xs-4 col-xs-offset-4">
<div class="form-group">
<div class="has-feedback">
<asp:Button ID="lnkDelete" runat="server" Text="Delete" CssClass=" form-control btn btn-danger btnRound"
OnClientClick="return getConfirmation(this, 'Please confirm to Delete','Are you sure you want to delete?');" />
<i class="glyphicon glyphicon-trash form-control-feedback "></i>
</div>
</div>
</div>
</div>
</form>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
:) Output ******
Comments
Post a Comment