I have written a code to open a page as modal popup. it works fine. but when the page is opened as a dialog and i click the asp button of the opened page it causes page to go spawn in a window..and parent page goes away... how can i fix the problem so that if i do postback in popped page then also it should remain as popup in main page.
when i click on the button in Payment_Delivery_Scheduling.aspx it causes page to redirect on that page in browser.
function openPaymentAndDeliveryModel(id) {
var windowWidth = $(window).width() / 1.25;
var windowHeight = $(window).height() /1.5;
$('#popup').load("Payment_Delivery_Scheduling.aspx?id=" + id + "", function () {
});
$('#popup').dialog({ modal: true, height: windowHeight, width: windowWidth });
}