response.redirect 用法

asp 中 用response.redirect () 跳转到不同的页面是怎么写的,比如从index.asp跳到admin目录下的a.asp 还有从a跳回 index.asp怎么写的 请教高手

1、常用方法:
ServletResponse -- 通用的response提供了一个响应应该具有最基本的属性和方法

HttpServletResponse -- 在ServletResponse的基础上针对于HTTP协议增加了很多强化的属性和方法

2、redirect 重定向的通用语法为:redirect(url,params=array(),delay=0,msg=''),假设当前为默认 HOME分组 Aritcle模块 insert操作

3、response

英 [rɪ'spɒns]  美 [rɪ'spɑns] 

n. 响应;反应;回答

4、redirect

英 [[ˌri:dəˈrekt]]  美 [[ˌridɪˈrɛkt,-daɪ-]] 

    vt. 使改方向;重新寄送

    adj. 再直接的

    n. 再直接询问

例句:

Redirect to the next page. 

重定向到下一个网页。

This means that you can redirect output to a remote command. 

这意味着您可以将输出重新定向到远程命令。

In theory, if a search engine finds a URL with a 301 redirect on it, they will follow the redirect to the new URL then de-index the old URL. 

从理论上来讲,如果一个搜索引擎找到的一个使用301重定向的URL,它将跟踪这个重定向的URL然后在索引库中去掉旧的URL。

They have made generous response to the appeals for funds. 

他们对募集资金的呼吁作出了慷慨的响应。

His eloquent speech called out a response in the heart of every man. 

他雄辩的演说在每个人的心里引起了反应。

We can do this because of the void response for both the requestor and provider. 

我们可以这样做是因为请求者和提供者中的响应都是无效的。

温馨提示:答案为网友推荐,仅供参考
第1个回答  推荐于2018-02-23
~/表示从根目录开始,
./表示从当前目录开始。
../表示当前目录的上级目录中。
因此从index.asp跳到admin目录下的a.asp,从根目录开始
Response.Redirect("~/admin/a.asp")
再从a跳回 index.asp,只需要到其上级目录
Response.Redirect("../index.asp")本回答被提问者和网友采纳
第2个回答  2010-11-22
'从index.asp跳到admin目录下的a.asp'
Response.Redirect("admin/a.asp")
'从a跳回 index.asp'
Response.Redirect("../index.asp")
第3个回答  2019-05-01
都是先后台代码后前台代码呢。服务器在编译过程中,就转走了。不执行前台页面。前台页面是在客户端执行的。必须编译完,发给客户端,才会弹处。所以弹出不起作用。

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网