Loading a CANCEL page into a jquery dialog.
Jquery dialog has confirmation button like "YES" and "NO".If i click the YES button it should fire button click event from cancel.aspx page loaded in jquery dialog.
Please help me how call click event from loaded page.
1)Modify.aspx
<div id="dialogCancel" style="display: none;">
</div>
$("#dialogCancel").load('Cancel.aspx').dialog({
open: function () {
$(".ui-dialog-titlebar-close").hide();
},
width: '300',
height: '200',
modal: true,
draggable: false,
resizable: false,
show: {
effect: 'fade',
duration: 1500
},
buttons: {
'Yes': function () {
//if YES fire button click event from cancel page loaded in jquery dialog.
location.reload(true);
},
'No': function () {
$(this).dialog('close');
}
}
});
2) Cancel.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Cancel.aspx.cs"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<link href="Scripts/Jquery/themes/dark-hive/jquery-ui.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="red">
<form id="Cancel" runat="server">
<div id="div1">
<center>
<br />
<br />
<asp:Button ID="btnCancel" runat="server" Text="Yes" Height="28px" Visible="False" onclick="btnCancel_Click" />
</center>
</div>
</form>
</body>
</html>