当前页面重定向 [英] Current page redirect

查看:152
本文介绍了当前页面重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我被一件事打中了.
我想做的是会话过期时,重新登录后我想将用户重定向到会话过期的同一页面.
我该如何在vb 2005中使用c#
我试图将当前页面的值保留在会话中,但由于过期而无法在登录页面上获取这些值.
谢谢.

Hello guys i am struck in one thing.
What i want to do is when the session gets expired,after re login i want to redirect the user to the same page on which the session got expired.
How can i do this in vb 2005 using c#
I tried to keep the value of the current page in the sessions but cant get the values on login page as they gets expired.
Thanks.

推荐答案

您可以使用Request.UrlReferrer属性来实现.参见 [这种方式 [ ^ ].
You can achieve by using Request.UrlReferrer Property. See this[^] how to Use it.
Otherwise, try in this way[^] also.


您还可以尝试通过从查询中获取URL来将URL保存在查询字符串中,并将登录页面重定向到上一页.字符串.
You can also try to save the URL in query string and redirect login page to the previous page by fetching the URL from query string.


这篇关于当前页面重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆