display jQuery dialog from code behind

Milahawaywafe

New Member
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). My (very simple) HTML:\[code\]<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ButtonMustWork.aspx.vb" Inherits="NowDisplayPictures.ButtonMustWork" %><!doctype html><html lang="en"><head><meta charset="utf-8" /><title>jQuery UI Dialog - Default functionality</title><link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" /><script src="http://code.jquery.com/jquery-1.9.1.js"></script><script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script><link rel="stylesheet" href="http://stackoverflow.com/resources/demos/style.css" /><script> function GetDialogBox() { $("#dialog").dialog(); }</script></head><body> <form id="form1" runat="server"> <div id="dialog" title="Basic dialog"> <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> </div> <div> <asp:Button ID="Button1" runat="server" Text="Button" /> </div> </form></body></html>\[/code\]and my VB button on-click event:\[code\]Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.ClickClientScript.RegisterStartupScript(Me.[GetType](), "Test", "<script>GetDialog();</script>")End Sub\[/code\]All I get is a blank page with the text on it, and a button .Any ideas please?
 
Back
Top