a*********u 发帖数: 1463 | 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!! | a9 发帖数: 21638 | 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!!
|
|