title: asp.Net jquery Modal Dialog Form
body: <p>Iam trying to open a pop up login form in jquery modal dialog on click of a button in a asp.net page. But the modal dialog is not coming as a pop up window.Please tell where Iam doing wrong.</p>
  
  <p>here is my HTML code:</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="ModalForm.aspx.cs" Inherits="ModalForm" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script src="js/jquery.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;link href="css/jquery.modaldialog.css" rel="stylesheet" type="text/css" /&gt;
      &lt;script src="js/jquery.modaldialog.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $("#dialog").dialog({
                  bgiframe: true,
                  autoOpen: false,
                  height: 300,
                  modal: true,
                  buttons: {
                    Cancel: function() {
                      $(this).dialog("close");
                  }
                  },
                  close: function() {
                  allFields.val("").removeClass("ui-state-error");
                  }
              });
  
              // Display the modal dialog.
              $("#btndialog").click(function() {
  
                  $("#dialog").dialog("open");
              });
  
          });
  
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
          &lt;div id="dialog" title="Please Login"&gt;
            &lt;asp:Login ID="LoginForm" runat="server" /&gt;  
          &lt;/div&gt;
          &lt;asp:Button ID="btndialog" runat="server" Text="Click"  /&gt;         
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>thanks</p>