Display jQuery dialog from code behind
<p>I have researched this for days! I'm simply trying to get an event in VB code behind to display a jQuery dialog (with suitable message). </p>

<p>My (very simple) HTML:</p>

<pre><code>&lt;%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ButtonMustWork.aspx.vb" Inherits="NowDisplayPictures.ButtonMustWork" %&gt;

&lt;!doctype html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="utf-8" /&gt;
&lt;title&gt;jQuery UI Dialog - Default functionality&lt;/title&gt;
&lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" /&gt;
&lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
&lt;script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" href="/resources/demos/style.css" /&gt;
&lt;script&gt;

    function GetDialogBox() {
        $("#dialog").dialog();
    }
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div id="dialog" title="Basic dialog"&gt;
            &lt;p&gt;This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &lt;asp:Button ID="Button1" runat="server" Text="Button" /&gt;   
    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and my VB button on-click event:</p>

<pre><code>Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
ClientScript.RegisterStartupScript(Me.[GetType](), "Test", "&lt;script&gt;GetDialog();&lt;/script&gt;")
End Sub
</code></pre>

<p>All I get is a blank page with the  text on it, and a button .Any ideas please?</p>
