There is such code asp.net webforms.
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <script type="text/javascript" src="Scripts/jquery-1.10.2.js"></script> <script type="text/javascript" src="Scripts/jquery-ui.min.js"></script> <link href="Scripts/jquery-ui.css" rel="stylesheet" type="text/css"/> </head> <body> <form id="form1" runat="server"> <div> <div id="popup" style="display:none" title="Bla"> <asp:GridView ID="GridView1" runat="server"></asp:GridView> </div> <asp:Button ID="Button1" runat="server" Text="Button" /> </div> </form> <script type="text/javascript"> $('#Button1').click(function () { $('#popup').dialog({ Width: 600 }); }); </script> </body> </html> Why does the window appear and immediately disappear when I press the button? How can it be done so that it does not disappear?