title: jQuery UI Dialog(Modal), prevents any postback
body: <p>How can I make an ASP.NET submit button postback while in jQuery UI dialog?</p>
  
  <p>Actually I am using the UI dialog modal like the one we did with Ajax control toolkit's modal, to update values of data stored in a gridview control. I am able to do every thing, but I can not trigger a postback with a UI Modal. I am a little new to jQuery and its UI so, can't find a good solution for that.</p>
  
  <p>For Ajax toolkit's modal we used to set a trigger property so as to enable a postback when someone clicks on its submit button, but here it is like impossible. Following is my code:</p>
  
  <pre><code>//------------Modal first----------------
  &lt;div id="editEventModal" title="Edit Event Details" style="display:none"&gt;
  //-------Here are my controls with asp.net validators
   &lt;asp:Button ID="btnEditEvent" runat="server" Text="Save" ValidationGroup="EditEvent"  /&gt;
  &lt;/div&gt;
  
  //--------- JavaScript/jQuery method for calling popup
  function invokeEditPopup(){
      $("#editEventModal").dialog({
          width: 700,
          modal: true
      });
  }
  //-- Please not that I have not used UI_Dialog's predefined `OK`, `Cancel` buttons as I need to validate my form with asp.net validators on submit button's `click` event.
  </code></pre>
  
  <p>In the gridview I have added javascript event <code>invokeEditPopup()</code> to buttons (that will be used to popup the dialog), in the <code>GridView_DataBound</code> Event.</p>
  
  <p>How do I make the <code>btnEditEvent</code> of the dialog to make a postback, so as to carry out the required process on the server.</p>
  
  <p>-----------------------For more information------------------
  I tried using ideas from <em><a href="https://stackoverflow.com/questions/757232">jQuery UI Dialog with ASP.NET button postback</a></em>.</p>
  
  <p>And just below defining my dialog in the JavaScript, I tried using (of-course separately):</p>
  
  <pre><code>$("#editEventModal").parent().appendTo($("form"));
  
  //--------And---------------
  $(".ui-dialog").parent().appendTo($("form"));
  
  //--------And---------------
  $("#editEventModal").parent().prependTo($("form"));
  
  //--------And---------------
  $(".ui-dialog").parent().prependTo($("form"));
  </code></pre>
  
  <p>But it did not work correctly.</p>