Response.Write("<script Language=JavaScript>");
string url="reren.aspx";
Response.Write("ChildWindow = window.open('"+url+"', '111', 'width=220,height=200,top=180,left=280,toolbar=no,status=yes,location=no,menubar=no,directories=no,scrollbars=no,resizable=no')");
Response.Write("</script>");

解决方案 »

  1.   

    和asp中一样,如果是在aspx页面上写,如下:
    window.open("+url+", "111", "width=220,height=200,top=180,left=280,toolbar=no,status=yes,location=no,menubar=no,directories=no,scrollbars=no,resizable=no");如果写在.cs文件中,如imfine()所示。
      

  2.   

    ' 弹出查询窗口
        Private Sub LookUp(ByVal drFieldInfo As DataRow, ByVal htmlTD As TableCell, ByVal ViewName As String)        Dim Anchor As New HtmlAnchor()
            Dim imgCalendar As New HtmlImage()
            Dim strControlUrl As String        strControlUrl = "javascript:openPopupFocus('../Page/LookUp.aspx?Form="
            strControlUrl &= HtmlFormName & "&Field=" & drFieldInfo("control_name") & "&ViewName=" & ViewName
            strControlUrl &= "', '_blank', 540, 260, 'width=540,height=260,resizable=yes,toolbar=no,status=no,scrollbars=yes,menubar=no,directories=no,dependant=yes', true, true);"        Anchor.Attributes.Add("onclick", "setLastMousePosition(event,0,0)")
            imgCalendar.Src = "../Images/button/search.gif"
            imgCalendar.Border = 0
            imgCalendar.Alt = "查找..."
            Anchor.Controls.Add(imgCalendar)
            Anchor.HRef = strControlUrl
            htmlTD.Controls.Add(Anchor)    End Sub