I'm using jqueryui dialog function to display my registration form. I have no problem with opening the dialog and displaying register.aspx file in the div. However I have a register button which I would like to use to save the form data into the database. But when I click to that button, it closes the dialog box and redirects the page to the register.aspx. I tried to disable usesubmitbehavior but that didn't help it completely blocks the function of the button.
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" UseSubmitBehavior="False" />
protected void Button1_Click(object sender, EventArgs e)
{
firstName.Disabled = true; // this will be replaced for db data entry. It was just to see if the function is working or not.
}