饼干问题? [英] cookie problem ?

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

问题描述

你好。每个人



我创建了登录页面,当用户登录我的wibsite并且用户第二次登录时,我需要cookie来响应重定向到数据页面回复主页不在数据页面



谢谢

hello everybody

iam created login page , i need cookie to response redirect to data page when user login once to my wibsite and when user login second time i have to response to home page not in data page

thank you

推荐答案

嗯我认为你可以做当你的用户首先登录时,通过为你的URL添加值,然后

他/她注销会向这样的网址添加值。



urDefaultPage.aspx?FirstLogin = hasvalue\





之后你可以通过Request.QueryString检查是否为值(FirstLogin)如果为空/空,您可以将您的用户引导至数据页,如果有价值则将他/她引导至您的主页







抱歉我的英文不好
hmm i think you can do that by adding value to ur URL when your user log in first then
he/she log out add value to url like this.

"urDefaultPage.aspx?FirstLogin=hasvalue"\"


after that you can check if ther is as value by Request.QueryString("FirstLogin") if that is null / empty you can direct your user to "data page" and if it has value direct him/her to your "home page"



sorry for my bad english


只需检查Cookie是否存在。基于此进行重定向。



HttpCookieCollection.Get Method(String) [ ^ ]



问候..:)
Simply check whether the Cookie exist or not. Based on that make the redirection.

HttpCookieCollection.Get Method (String)[^]

Regards..:)


这篇关于饼干问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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