I'm trying to put JQuery Dialog into my ASP.Net application. The problem I'm getting is that when the user clicks on the "I Agree" button I want to do some server side work and then go back to the same page with a confirmation. So the way I thought about doing it was creating a asp.net button, set to display:none and I would call this from the dialog buttons. Unfortunately I can't call ASP.Net controls from the dialog until I assign the dialog to the form:
$dialog.parent().appendTo(jQuery("form:first");
But if I do that, and I'm using modal=true, then the dialog buttons become "hidden" behind the dialog overlay. :( Here's the latest javascript (with previous attempts commented out).