protected void Page_Load(object sender, EventArgs e)
        {
            
        }
        protected void Page_Unload(object sender, EventArgs e)
        {
            System.Web.HttpContext.Current.Response.Write("<script language=JavaScript>window.showModalDialog('tx.aspx','window','dialogWidth=565px;dialogHeight=410px');</script>");     
        }

解决方案 »

  1.   

    不要弹出模式窗口,应该是非模式,用window.openprotected void Page_Load(object sender, EventArgs e)
            {
                
            }
            protected void Page_Unload(object sender, EventArgs e)
            {
                System.Web.HttpContext.Current.Response.Write("<script language=JavaScript>window.open('tx.aspx','window','dialogWidth=565px;dialogHeight=410px');</script>");     
            }
      

  2.   

    用window.open 
    在加载后无任何反应啊··
    加载页是在iframe中显示··而弹出页不在iframe显示!
      

  3.   

    现在需要用ClientScript.RegisterStartupScript来写脚本的注册了吧,还有试试window.open('页面名称','窗口名','width=560 height=400')
      

  4.   

    这样也不行··还是没任何反应!!
    能把ClientScript.RegisterStartupScript的语法告示我吗··
      

  5.   

    ClientScript.RegisterStartupScript(this.GetType(), "AlertSomething_Reg", "alert(\"" + str_thetxt + "\")", true);
    大概这样的语法,应该有代码提示的
    另外不要写在unload中,试试写在你的登录事件的最后
      

  6.   

     protected void Page_Load(object sender, EventArgs e)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "window", "window.open('tx.aspx','window','Width=565px;Height=410px');", true);         }
    还是没反应!郁闷啊·
      

  7.   

    code=C#]代码·Page.ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", " <script language=javascript>window.showModalDialog('tx.aspx','window','dialogWidth=565px;dialogHeight=410px'); </script>"); 
    调试里
    <script language=javascript>window.showModalDialog('tx.aspx','window','dialogWidth=565px;dialogHeight=410px'); <
    这是怎么回事啊·[[/code]
      

  8.   


    代码·Page.ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", " <script language=javascript>window.showModalDialog('tx.aspx','window','dialogWidth=565px;dialogHeight=410px'); </script>"); 
    调试里 
    <script language=javascript>window.showModalDialog('tx.aspx','window','dialogWidth=565px;dialogHeight=410px'); < 
    这是怎么回事啊·
      

  9.   

    我做了测试页面是可以弹出的
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>无标题页</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
        </div>
        </form>
    </body>
    </html>
    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {    ClientScript.RegisterStartupScript(this.GetType(), "window", "window.open('default.htm','window','Width=565px;Height=410px');", true);     }
    }
      

  10.   

    昏··我新建了一个页面也可以··就我要做的页面不可以··郁闷了··
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index_main.aspx.cs" Inherits="JadeerpWeb.Login.index_main" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>内页</title>
        <link href="~/Css/main.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript">
        function selectspxx() 
          { 
            window.showModalDialog('tx.aspx','window','dialogWidth=565px;dialogHeight=410px');
           }
        </script>
    </head>
    <body>
        <div style="width: 389px; position: absolute; top: 75px; left: 288px;">
            <img src="../images/5.jpg" 
                style="width: 341px; height: 318px; margin-right: 0px" /></div>
        <p>
            &nbsp;</p>
        <p>
            &nbsp;</p>
    </body>
    </html>
      

  11.   

    //打开一个对话框,参数的含义分别是路径,长度和高度
    public static void OpenWebForm1(string url,string width ,string  height)
    {
    string js=@"<Scrip t language='JavaScrip t'>";
    js += "window.open('"+ url + @"','','height = ";
        js +=  height + ",width = " + width + ",top=100,left=100,location=no,menubar=no,resizable=no,scrollbars=no,status=yes,titlebar=no,toolbar=no,directories=no');";
        js += "</Script>";
    HttpContext.Current.Response.Write(js);     
    }
      

  12.   

    Scrip t,这样的东西,还有sql语句,我怎么直接发布出去呢?别人可以,搞得我不得不加个空格什么的!
      

  13.   

    哈哈··解决了···然来是没form