Page.RegisterStartupScript("首页", "<script>openNwin=window.open('index.aspx','_blank','width=425,height=208  ,fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0')</script>");

解决方案 »

  1.   

    Response.Write("<script>window.top.location.href='");
    Response.Write("\'");
    Response.Write("\index.aspx");
    Response.Write("\'");
    Response.Write("<");
    Response.Write("/");
    Response.Write("script>");
      

  2.   

    上面有问题,试试这个
    Response.Write("<script>window.top.location.href=");
    Response.Write("\'");
    Response.Write("\index.aspx");
    Response.Write("\'");
    Response.Write("<");
    Response.Write("/");
    Response.Write("script>");
      

  3.   

    Response.Write("<script>window.top.location.href='index.aspx'</script>");
    这句看起来没有错误
      

  4.   

    用这个试RegisterStartupScript可能是脚本在对象产生前就执行了 先注册一下
      

  5.   

    试试这一句:Response.write("<script>window.opener.location.href='index.aspx';</script>");
      

  6.   

    Response是PAGE的属性
    所以你不能在离开PAGE的地方使用
      

  7.   

    应该是:
    Response.Write( "<script>window.top.location.href='index.aspx'</" + "script>" );
      

  8.   

    如果是c#的注意转义字符,把那些字符转下,如果是vb的就可以直接写了。
      

  9.   

    Response.Write("<script>window.top.location.href='index.aspx'</script>"
    -------------------------------------------------------------------------------
    Response.Write("<script>window.top.location.href='index.aspx';</script>");