avatar
a*u
1
I have 2 web pages, pageA and pageB.
There is a hyperlink in pageA to redirect user to pageB.
User must go to PageA and click on the link to pageB. If user visit pageB
directly, then a popup will display to warn user and redirect user back to
pageA.
My question is how to know if user open page by hyperlink or not?
The hints is to use session state and JavaScript.
But I still could not figure it out :( ...
Can someone help?
Thanks!!
avatar
a9
2
最简单的:取Request.refer
比较麻烦的 在pageA里 加上Session["VisitedPageA"] = 1;
pageB里 if(Session["VisitedPageA"] != null && (int)Session["VisitedPageA"] =
= 1){
ffff
}
还有更麻烦点的,就是改link。比如
个随机,到b里去检查。 当然还是要用session的配合。以检查的确是从a来的,而不是
a->c->b

【在 a*********u 的大作中提到】

: I have 2 web pages, pageA and pageB.
: There is a hyperlink in pageA to redirect user to pageB.
: User must go to PageA and click on the link to pageB. If user visit pageB
: directly, then a popup will display to warn user and redirect user back to
: pageA.
: My question is how to know if user open page by hyperlink or not?
: The hints is to use session state and JavaScript.
: But I still could not figure it out :( ...
: Can someone help?
: Thanks!!

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。