如何登出后,回到原来的LOGIN.ASPX?

billwang188 2003-08-21 10:48:28
我有一框架页,左面是left,右面是right,按左面的按钮,显示在右面。现在我用
System.Web.Security.FormsAuthentication.SignOut()
Response.Redirect("login.aspx")
想显示在非框架页,而不是在right显示,该如何做?
...全文
93 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
billwang188 2003-08-21
  • 打赏
  • 举报
回复
首先是1、login.aspx 然后是2、defalt.aspx
在defalt.aspx中
<frameset cols="19%,81%" border="0" frameSpacing="0" frameBorder="1">
<frame name="left" src="left.aspx">
<frame name="right" src="">
</frameset>
在left.aspx中有一个button,其中target=right;onclick的语句在后台是:

System.Web.Security.FormsAuthentication.SignOut()
Response.Redirect("login.aspx")

chnking 2003-08-21
  • 打赏
  • 举报
回复
怎么可能,你把你的代码贴出来吧
billwang188 2003-08-21
  • 打赏
  • 举报
回复
to:kent
对不起,在right frame显示的是left.aspx不是login.aspx
billwang188 2003-08-21
  • 打赏
  • 举报
回复
to:kent
可我的login.aspx仍然在right frame显示?怎么回事?
chnking 2003-08-21
  • 打赏
  • 举报
回复
window.top
表示最顶层的框架
billwang188 2003-08-21
  • 打赏
  • 举报
回复
top
billwang188 2003-08-21
  • 打赏
  • 举报
回复
左框架left中的left.aspx的window.top就是left.aspx呀?
执行response.write("<script language='Javascript'>window.top.location='login.aspx';</script>")
的结果是:在right中显示left.aspx。请继续帮忙!多谢!
chnking 2003-08-21
  • 打赏
  • 举报
回复
System.Web.Security.FormsAuthentication.SignOut()
string str = "<script>";
str += "window.top.location.href = 'login.aspx'";
str += "<s/cript>";
Page.RegisterStartupScript("script1",str);
luckysusan 2003-08-21
  • 打赏
  • 举报
回复
response.write("<script language='Javascript'>window.top.location='login.aspx';</script>")
chnking 2003-08-21
  • 打赏
  • 举报
回复
left.aspx的完整代码?
cm8983 2003-08-21
  • 打赏
  • 举报
回复
Response.Write("<script>top.location.href='Login.aspx';</script>")

62,046

社区成员

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

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

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

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