Add
$("#popupdiv").parent().appendTo($("form:first"));
after you create your dialog.
$("#popupdiv").dialog({
title: "Send details to Mobile/Email",
width: 500,
height: 250,
modal: true,
buttons: {
Send: function () {
$("[id*=btnSend]").click();
},
Close: function () {
$(this).dialog('close');
}
}
});
$("#popupdiv").parent().appendTo($("form:first"));
This is because the dialog is created out of the form tag and cannot post values back to the page. Hence the dialog has to be added to the current form.