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!! |
|
a*********u 发帖数: 1463 | 2 【 以下文字转载自 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 |
|
|
g*****g 发帖数: 34805 | 5 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. |
|