c# - JQuery UI Dialog with Asp .NET button postback - Stack Overflow:

$('#divname').parent().appendTo($("form:first"));


That was a pulling hair out situation.

Got more help (and fuller description of what was going on) here:

One of the first things you will notice when you try and use JQuery UI Dialog in ASP.Net page is it does not perform post backs from within the dialog window. This is because in a ASP.Net page there is only one form element and Jquery appends the dialog "div" outside of the form element.