Using jQuery UI dialog:
SCRIPT:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<script>
$(function () {
$("#<%=btnUserDelete.ClientID%>").on("click", function (event) {
event.preventDefault();
$("#dialog-confirm").dialog({
resizable: false,
height: 140,
modal: true,
buttons: {
Ok: function () {
$(this).dialog("close");
__doPostBack($('#<%= btnUserDelete.ClientID %>').attr('name'), '');
},
Cancel: function () {
$(this).dialog("close");
}
}
});
});
});
</script>
HTML:
<div id="dialog-confirm" style="display: none;" title="Confirm Delete">
<p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>Are you sure you want to delete this user?</p>
</div>