重定向到下一页 [英] Redirect to the next page

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

问题描述

我想要重定向到用户要转到的下一页的代码.
示例:我创建了一个页面,例如add_image和add_files等,用户只能在登录后才能进入.
如果用户没有登录就单击此页面,则该页面转到登录页面.
用户登录后,我要转到用户要转到的页面.

请任何人可以帮助我.在此先感谢

I want the code for redirect to the next page where user want to go.
Example: I have create page like add_image and add_files etc. where user can go only after login.
if user click to this page without login then the page go to the login page.
After login by the user i want to go to those page where user want to go.

Please any one can help me. Thanks in advance

推荐答案

尝试此

如何在asp.net中创建安全登录 [ ^ ]
try this

how to create secure login in asp.net[^]


为此,您可以在用户添加图像或文件时以及之后创建Session ["user"] ="Value"用户登录,验证后检查(Session ["user"]!= null),然后response.redirect("Your page")
For this you can create a Session["user"]="Value" while the user is Adding the image or files, and after the user login,after validation check if (Session["user"] != null) then response.redirect("Your page")


实现此目的的最佳方法是使用表单身份验证....请参考以下URL,以更好地理解

http://msdn.microsoft.com/en-us/library/ff647070.aspx [ ^ ]
The best possible way to implement this is by using Forms authentication....please refer the following URL for having a better understanding

http://msdn.microsoft.com/en-us/library/ff647070.aspx[^]


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

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