title: jquery dialog form example
body: <p>I am trying to put a asp.net form into a jquery popup dialog  box.
  My script is in the head tag of a master page and my form is in a content page.  This is what I have so far, if I set the autoOpen: false the form pops up without the openme button click event first and the form won't submit, if I set it to open false the page refreshes but the dialog does not work.  Looking for help with the code and a better example of of a asp.net form inside a jquery dialog box?  Thanks!!!</p>
  
  <pre><code>    &lt;script src="//code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt;
      &lt;script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"&gt;&lt;/script&gt;
  
     &lt;script&gt;
      $(document).ready(function () {
      $("#dialog").dialog({ autoOpen: false });
  
      $("#btnOpenMe.ClientID").click(
          function () {
              $("#dialog").dialog('open');
              return false;
          }
      );
  });
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;td colspan="2" style="text-align:center"&gt;
              Update Form
          &lt;/td&gt;
      &lt;/tr&gt;       
      &lt;tr&gt;
          &lt;td&gt;
              &lt;asp:Label ID="lblUpdate" runat="server" Text="Update Reason:"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;asp:TextBox ID="txtUpdate" TextMode="MultiLine" Columns="30" Rows="5" runat="server"&gt;&lt;/asp:TextBox&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
  
          &lt;td&gt;
              &lt;asp:Button ID="btnSupmitUpdate" runat="server" Text="Button" OnClick="btnSupmitUpdate_Click" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/div&gt;
   &lt;asp:Button ID="btnOpenMe" runat="server" Text="Click Me to open Dialog box" /&gt;
  </code></pre>