作者TonyQ (骨头)
看板Web_Design
标题Re: [问题] 有关ASP的Response.Redirect ""
时间Wed Mar 21 19:19:24 2007
※ 引述《antory ( )》之铭言:
: 您好!我是想做ASP的Check LogIn的分页
: Check LogIn.asp会接收各个网页传过来的ID&PassWord&档名
: 例如:
: 1.asp -> -> if match -> Response.Redirect "1.asp"
: 2.asp -> Check.asp -> if match -> Response.Redirect "2.asp"
: 3.asp -> -> if match -> Response.Redirect "3.asp"
: -> else error -> Log again
: 我在check.asp里面这样写
: ID=Request.form("ID")
: Pwd=Request.form("Pwd")
: Selfurl=Request.form("Selfurl")
: if match then
: Response.Redirect "Selfurl"
^^^^^^^^^
: else
: ...
: End if
: 问题出在重新导向网页无法解析出Selfurl,
: 想请问一下,有解决的办法吗?
: Check.asp会接受任何位置传过来的档名,如果登入为真,即在导向回原本页面。
我看不懂你的问题,
你确定你code要表达的不是 Response.Redirect Selfurl?
因为你前面request已经一个Selfurl ,
後面却用字串写Selfurl,感觉实在很诡异。
以上是在於你已经能取得Selfurl但是却跑不出来的情况下。
────────────────────────────────
如果是值传不过来(request不到),可以考虑以下的两个方案。
aciton的时候用get的方式把selfurl传给check.asp,
action="check.asp?selfurl='login.asp'"
不过这样的话就要用 request.QueryString("selfurl") 去取得资料了。
或者直接用POST 把selfurl塞到 hidden form里面 跟着帐密送出。
request.form() <=读取POST用
request.QueryString() <=读取GET用
--
I am a person, and I am always thinking .
Thinking in love , Thinking in life ,
Thinking in why , Thinking in worth.
I can't believe any of what ,
I am just thinking then thinking ,
but worst of all , most of mine is thinking not actioning...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.134.27.68