怎么样使asp.net网页只显示当前页,不能再打开其它的网页?

huyongjian2008 2008-12-02 04:35:26
怎么样使asp.net网页只显示当前页,不能再打开其它的网页?我做的是考试系统。想实现在线考试时,只能显示当前页面,不能缩小,只能是默认状态!!
...全文
199 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Eray 2008-12-05
  • 打赏
  • 举报
回复
模态弹出窗口.
脚本函数是window.showModalDialog()
huyongjian2008 2008-12-03
  • 打赏
  • 举报
回复
请问你写哪里的啊?我写好像不得那样!

代码如下:
<%@ Master Language="VB" CodeFile="jiaowuchu.master.vb" Inherits="MasterPage" %>

<!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>
<table style="width: 1024px; height: 256px">
<tr>
<td colspan="3" style="background-attachment: scroll; background-image: url(image/title1024.jpg);
height: 145px; width: 1017px;">
</td>
</tr>
<tr>
<td colspan="3" style="height: 15px; border-bottom: gray thin solid; width: 1017px;">
<asp:Label ID="Label1" runat="server" Text="Label" Width="896px"></asp:Label></td>
</tr>
<tr>
<td colspan="3" style="vertical-align: top; height: 257px; text-align: left; border-bottom-width: thin; border-bottom-color: blue; line-height: normal; width: 1017px;">
<table style="width: 100%; height: 240px">
<tr>
<td rowspan="3" style="border-top-width: thin; border-right: blue thin ridge; border-left-width: thin; border-left-color: black; vertical-align: top; width: 6px; border-top-color: black; height: 297px; background-image: url(image/left.jpg);">
<asp:TreeView ID="TreeView1" runat="server" ImageSet="Arrows" style="vertical-align: top; text-align: left" ShowLines="True" Height="320px">
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
<SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
VerticalPadding="0px" />
<Nodes>
<asp:TreeNode Text="首页" Value="首页"></asp:TreeNode>
<asp:TreeNode Text="学生电子表注册" Value="学生电子表注册">
<asp:TreeNode Text="excel表格导入" Value="excel表格导入"></asp:TreeNode>
<asp:TreeNode Text="单个学生注册" Value="单个学生注册"></asp:TreeNode>
<asp:TreeNode Text="学生电子表浏览" Value="学生电子表浏览"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="学期成绩表注册" Value="学期成绩表注册">
<asp:TreeNode Text="excel电子表导入" Value="excel电子表导入"></asp:TreeNode>
<asp:TreeNode Text="学期成绩表浏览" Value="学期成绩表浏览"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="专业编辑" Value="专业编辑">
<asp:TreeNode Text="添加专业" Value="添加专业"></asp:TreeNode>
<asp:TreeNode Text="删除专业" Value="删除专业"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="公告编辑" Value="公告编辑">
<asp:TreeNode Text="添加公告" Value="添加公告"></asp:TreeNode>
<asp:TreeNode Text="删除公告" Value="删除公告"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
<NodeStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px"
NodeSpacing="0px" VerticalPadding="0px" />
</asp:TreeView>
</td>
<td colspan="2" rowspan="3" style="border-bottom-width: thin; border-bottom-color: blue;
vertical-align: top; height: 297px">
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server" >
</asp:contentplaceholder>
</td>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
<table style="width: 100%">
<tr>
<td style="background-image: url(image/bottom1024.jpg); width: 100px; height: 48px">
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
 </div>
</form>
</body>
</html>
wdf618 2008-12-02
  • 打赏
  • 举报
回复
用windows.open打开该页
设置如下:
window.open(encodeURI( URL ),'','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,top=50,left=50,width=600,height=480');

这是前台方法,写在后台的话要用Response.write("<script language=javascript> </script>")来包裹~~~

62,269

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧