由买买提看人间百态

topics

全部话题 - 话题: pageb
(共0页)
a*********u
发帖数: 1463
1
来自主题: DotNet版 - Help!
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!!
a*********u
发帖数: 1463
2
来自主题: Java版 - Help! (转载)
【 以下文字转载自 DotNet 讨论区 】
发信人: apieceofyou (apieceofme), 信区: DotNet
标 题: Help!
发信站: BBS 未名空间站 (Fri Dec 30 19:08:00 2011, 美东)
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... 阅读全帖
s******e
发帖数: 114
3
redirect pagaA to pageB
if pageA is really simple, then pagaA can be a html file. you simply modify
action attribute of form tag in pagaA.html to point to pagaB.aspx
if PagaA is really simple, then pagaA and pageB can be same, say pagaAB.aspx
, pagaA will be rendered in ispostback!=true block of PageAB.aspx.
if PagaA is not so simple(ie involve some postback processing), then In
pagaA.aspx, you can use server.transer to redirect to pagaB.aspx.
if PagaA is not so simple(ie involve some postback
a9
发帖数: 21638
4
来自主题: DotNet版 - Help!
最简单的:取Request.refer
比较麻烦的 在pageA里 加上Session["VisitedPageA"] = 1;
pageB里 if(Session["VisitedPageA"] != null && (int)Session["VisitedPageA"] =
= 1){
ffff
}
还有更麻烦点的,就是改link。比如
个随机,到b里去检查。 当然还是要用session的配合。以检查的确是从a来的,而不是
a->c->b
g*****g
发帖数: 34805
5
来自主题: Java版 - Help! (转载)
Easy, generate a token on server side before displaying in pageA,
have the token as a parameter, if user goes through pageA->pageB,
the token is sent to server again, server compares the token in
user session against this one, if it matches, displays pageB, otherwise
deny access.
(共0页)