try this code ............
--
Regards
John Timney
Microsoft Regional Director
Microsoft MVP
<html>
<head>
<script language="VB" runat="server">
Sub Page_Load( sender as Object,e as EventArgs)
'Form the script that is to be registered at client side.
Dim scriptString as String = "<script language=JavaScript> function
DoClick() {"
ScriptString +=
"window.open('http://www.mvps.org','MyWindow','width=500,height=500');} <"
scriptString += "/"
scriptString += "script>"
If(Not IsClientScriptBlockRegistered("clientScript"))
RegisterClientScriptBlock("clientScript", scriptString)
End If
End Sub
</script>
</head>
<body topmargin="20" leftmargin="10">
<form id="myForm" runat="server">
<INPUT id="launchButton" onclick="DoClick();" type="button"
value="Submit" name="myButton" runat="server">
</form>
</body>
</html>
"Logger" <Lo****@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.com...
Help! I'm trying to get popups to work in asp.net. I'm Using the
following javascript code in a sub, but I can't get the PopupWindow to work. At
first I thought the routine wasn't working but it is. It looks like it's
the window.open that's not working. I have site popup allowed turned on, if I
replace window.open with alert it works, if I put the code in the html
code it works. Any suggestions?
Dim PopupScript As String = "<script language='javascript'>" & _
"window.open('popup.aspx', 'CustomPopUp', " & _
"'height=550, width=550, menubar=no, resizable=no');" & _
"</script>"
Me.RegisterStartupScript("PopupScript", PopupScript)