title: JQuery Modal Popup
body: <p>I'm attempting to have a modalpopup appear once a button has been clicked on an asp.net page.</p>
  
  <pre><code>   &lt;%@ Control Language="C#" AutoEventWireup="true" CodeFile="TestFile.ascx.cs" Inherits="TestFile" %&gt;
      &lt;%@ Import Namespace="System.Collections.Generic" %&gt;
      &lt;%@ Import Namespace="System.IO" %&gt;
  
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
          &lt;title&gt;jQuery UI Example Page&lt;/title&gt;
          &lt;link type="text/css" href="css/ui-lightness/jquery-ui-1.8.21.custom.css" rel="stylesheet" /&gt;
          &lt;script type="text/javascript" src="js/jquery-1.7.2.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="js/jquery-ui-1.8.21.custom.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt; 
  
                  function fnmodalpopup() {
          $( "#dialog-modal" ).dialog({
              height: 140,
              modal: true
  });
          &lt;/script&gt;
      &lt;/head&gt;
  
      &lt;!--Misc functions for operations --&gt;
      &lt;script runat="server" type="text/javascript"&gt;
  
      &lt;/script&gt;
  
      &lt;div id="dialog-modal" title="Basic modal dialog"&gt;
          &lt;p&gt;Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;asp:Button ID="Button1" runat="server" Text="Button" /&gt;
  </code></pre>
  
  <p>I'm trying to create a dialog box exactly like <a href="http://jqueryui.com/demos/dialog/#modal" rel="nofollow">http://jqueryui.com/demos/dialog/#modal</a>, but triggered in an asp.net form by clicking a button. The page flashes and nothing appears.</p>
  
  <p>Any feedback would be very helpful!</p>