在学习C#+ASP.net,想知道如何禁止客户端浏览器的地址和其他工具栏显示呢?有知道的指教一下,谢谢!

解决方案 »

  1.   

    用JS写吧
    <script language=javascript>
        function opennew()
        {
        if (parent.frames.length==0)
        {
          var urlwin=window.open("../Index.aspx","","toolbar=no,status=yes,resizable=yes");
          urlwin.moveTo(0,0);
          urlwin.resizeTo(window.screen.availWidth,window.screen.availHeight);
        }
        window.opener=null;
        window.close();
        }
        </script> 你这样的
      

  2.   

    window.open ('page.html','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')
      

  3.   

    写在你要打开的页面的<body onload=window.opennew()> 或 者 <a href="你要打开的页面" onclick=opennew>描述</a>
      

  4.   

    写在你要打开的页面的<body onload=window.opennew()> 或 者 <a href="你要打开的页面" onclick=opennew()>描述</a>
      

  5.   

    hooyke(红旗下的蛋) 老兄:为什么按你说的写还是不行呢?
      

  6.   

    以下是我想不显示工具栏和其他地址栏的页面设计,帮帮我啊!插到哪里才可以啊!<%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="login8m8._Default" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <title>Default</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    </HEAD>
    <body MS_POSITIONING="GridLayout" >
        <form id="Form1" method="post" runat="server">
    <FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体">
    </FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体">
    </FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体">
    </FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT>
    <br>
    <br>
    <p align="center">中电集团南京十四所仿真试验平台数据管理系统</p>
    <hr align="center" runat="server" size="5" />
    <br>
    <table id="table1" align="center">
    <tr valign="middle">
    <td nowrap align="right">用户名</td>
    <td><asp:TextBox id="username" Runat="server"></asp:TextBox></td>
    <td>用户名至少为4个字符</td>
    </tr>
    <tr>
    <td align="right">密 码</td>
    <td>
    <asp:TextBox id="password" Runat="server"></asp:TextBox></td>
    <td>密码至少为6个字符</td>
    </tr>
    <tr>
    <td colspan="3" align="center">
    <asp:Button id="OK" Runat="server" Text="确认登录"></asp:Button></td>
    </tr>
    <tr>
    <td colspan="3" align="center"><asp:button id="getpassword" Runat="server" Text="忘记密码了"></asp:button></td>
    </tr>
    <tr>
    <td colspan="3" align="center"><asp:Label id="massage" Runat="server" ForeColor="Red"></asp:Label></td>
    </tr>
    </table>
    </form>
    </body>
    </HTML>
      

  7.   

    <script LANGUAGE="JavaScript"> 
    function openwin() 

    window.open ("main.aspx", "newwindow", "top=0, left=0, height=screen.availHeight, width=screen.availWidth, toolbar=no, menubar=yes, scrollbars=yes, resizable=yes, location=no, status=no" ); window.opener = null;
    window.close();
    }
    </script>然后在想弹出窗口的控件里onclick=openwin()
      

  8.   

    <HTML>   
      <HEAD>   
      <META   NAME="GENERATOR"   Content="Microsoft   Visual   Studio   6.0">   
      <TITLE></TITLE>   
      </HEAD>   
      <BODY>   
        
      <P>&nbsp;</P>   
        
      </BODY>   
      </HTML>   
      <SCRIPT   LANGUAGE=javascript>   
      <!--   
        window.open("URL","windowName","windowFeatures")    //-->   
      </SCRIPT>    URL:设置新窗口的路径   
      windowName:新窗口的名字,也是句柄   
      windowFeatures:   
                                  fullscreen:(yes/no)全屏状态   
                                  height:(整型)内容区域的高度,以像素为单位   
                                  left:(整型)屏幕左上角水平位置   
                                  location:(yes/no)显示当前URL的域,即地址栏   
                                  menubar:(yes/no)窗口顶部的菜单栏   
                                  resizable:(yes/no)允许通过拖放改变界面大小   
                                  scrollbars:(yes/no)如果文档大于窗口,则显示滚动条   
                                  status:(yes/no)窗口底部的状态栏   
                                  title:(yes/no)标题栏(ie5)   
                                  toolbar:(yes/no)行中Back、Forward和其他按钮   
                                  top:(整型)屏幕左上角的水平位置   
                                  width:(整型)内容区域的像素宽度
      

  9.   

    up
    问题是:弹出窗口别人会阻止,现在我想用Response.Redirect
    然后怎么去设置其工具栏隐藏呢?