Java Script Dialog :
Source Code :
protected void btn_Yes_Click(object sender, EventArgs e)
{
// Code Written
}
Script:
<script>
$(document).ready(function () {
});
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
$("#ContentPlaceHolder1_txtPellets").keydown(function (e) {
if (e.which === 9) {
debugger;
confirm2();
}
});
function confirm2() {
debugger;
var dialog = $('<p>Do you want to add More Racks ?</p>').dialog({
buttons: {
"Yes": function () {
$(this).dialog("close");
//$('pnlColdStorage').show();
Rowsave1();
},
"No": function () {
$(this).dialog("close");
Rowsave1();
$('btnSave').focus();
}
}
}
);
}
function Rowsave1() {
document.getElementById('<%= btnRowAdd.ClientID%>').click();
}
});
</script>
Source Code :
protected void btn_Yes_Click(object sender, EventArgs e)
{
// Code Written
}
Script:
<script>
$(document).ready(function () {
});
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
$("#ContentPlaceHolder1_txtPellets").keydown(function (e) {
if (e.which === 9) {
debugger;
confirm2();
}
});
function confirm2() {
debugger;
var dialog = $('<p>Do you want to add More Racks ?</p>').dialog({
buttons: {
"Yes": function () {
$(this).dialog("close");
//$('pnlColdStorage').show();
Rowsave1();
},
"No": function () {
$(this).dialog("close");
Rowsave1();
$('btnSave').focus();
}
}
}
);
}
function Rowsave1() {
document.getElementById('<%= btnRowAdd.ClientID%>').click();
}
});
</script>
No comments:
Post a Comment