if(Session["key"] == null)
Response.Redirect("Login.aspx");
Response.Redirect("Login.aspx");
解决方案 »
- 怎么实现GridView中的checkbox事件
- 如何解决页面过期的问题?
- *****高分求过滤页面内JS的函数*****
- 请问开发这样的网站多少钱
- vs2005里面是不是没有datagrid?
- 有哪些东西可以编译成dll (比如说类还有什么)
- 初学者,用VS2008+Mysql做网站,跪求帮助!!!
- 在一个页面中有个Panel和button 能否按button,把panel内容打印出错?
- 如何在使用treeview在另一个frameset中打开一个页面?
- angular2+ 引用signalr.js出问题,找不到人解决
- 请教高手:如何用脚本向HtmlTable添加单元格?(在线等待)
- datagrid取headertext问题
再在WebConfig中设置使用该错误页
<customErrors mode="ORemoteOnly" defaultRedirect="SystemError.aspx"/>
最好能提示用户是Session过期,需重新登陆
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
-->
<forms name ="assets" path ="/" loginUrl="login.aspx" protection="All" timeout="20"></forms>
</authentication>
<authorization>
<deny users ="?"/>
</authorization>
Response.Redirect("Login.aspx");
不能满足吗?-----------努力学习 不断实践 虚心讨教---------
</authentication>
<authorization>
<deny users ="?"/>
</authorization>
在所有的SESSION过期后都会自动转到LOGIN.ASPX
if(Session["key"] == null)
Response.Redirect("Login.aspx");我想在一个地方写,使得Session过期后自动跳到登录页
public class FrmJlBMainList : gpt.GptPageList
{}
gpt.GptPageList:验证页面类
FrmJlBMainList:其他页面.
你的方法不灵啊!总是在登录页面,不能到其他页面啊!你再仔细看看,是否哪儿写错了