I have an asp.net button control on the page.
<asp:Button ID="btnFinishReceiving" runat="server" Text="Finished Receiving" Width="168px"
OnClick="btnFinishReceiving_Click" />
on the click of it I am opening a dialog box.
$("#<%= btnFinishReceiving.ClientID %>").click(function() {
$("[id*='ConfirmDialog']").dialog('open');
});
$(document).ready(function() {
$("[id*='ConfirmDialog']").dialog({
autoOpen: false,
width: 600,
buttons: {
"Yes": function() {
return true;
},
"No": function() {
return ValidateClientInfo();
}
}
});
});
Issue is : As soon as I click on the button, dialog box come up and page got postback. I want to postback the page once user clicks on a button in dialog box.
Have your form’s “onSubmit” function return false.
UPDATE: To be extra sure, event.preventDefault(); will also stop any default behavior at that time, such as a form submit.