教程集 www.jiaochengji.com
教程集 >  脚本编程  >  Asp.net  >  正文 Server.Transfer和Response.Redirect的区别

Server.Transfer和Response.Redirect的区别

发布时间:2017-10-22   编辑:jiaochengji.com
教程集为您提供Server.Transfer和Response.Redirect的区别等资源,欢迎您收藏本站,我们将为您提供最新的Server.Transfer和Response.Redirect的区别资源
<table style="WIDTH: 594pt; BORDER-COLLAPSE: collapse" cellspacing="0" cellpadding="0" width="792" border="0" x:str=""> <colgroup><col style="WIDTH: 54pt" span="11" width="72"></col></colgroup> <tbody> <tr style="HEIGHT: 13.5pt" height="18"> <td style="WIDTH: 594pt; HEIGHT: 13.5pt" width="792" colspan="11" height="18">Response.Redirect 简单地发送一条消息到浏览器,告诉浏览器定位到另一个页面。你可以使用下面的代码将</td> </tr> <tr style="HEIGHT: 13.5pt" height="18"> <td style="HEIGHT: 13.5pt" colspan="3" height="18" x:str="用户引导到另一个页面: ">用户引导到另一个页面: </td> </tr> <tr style="HEIGHT: 13.5pt" height="18"> <td style="HEIGHT: 13.5pt" colspan="4" height="18" x:str="Response.Redirect("WebForm2.aspx") ">Response.Redirect("WebForm2.aspx") </td> </tr> <tr style="HEIGHT: 13.5pt" height="18"> <td style="HEIGHT: 13.5pt" height="18" x:str="或者 ">或者 </td> </tr> <tr style="HEIGHT: 13.5pt" height="18"> <td style="HEIGHT: 13.5pt" colspan="5" height="18" x:str="Response.Redirect("http://www.cnnas.com/") ">Response.Redirect("http://www.cnnas.com/") </td> </tr> <tr style="HEIGHT: 13.5pt" height="18"> <td style="HEIGHT: 13.5pt" colspan="11" height="18">Server.Transfer 也是通过一条语句将用户引导到另一页面,比如:Server.Transfer("WebForm2.aspx")。</td> </tr> <tr style="HEIGHT: 13.5pt" height="18"> <td style="HEIGHT: 13.5pt" colspan="5" height="18" x:str="不过,这条语句有一系列独特的优缺点。 ">不过,这条语句有一系列独特的优缺点。 </td> </tr> <tr style="HEIGHT: 13.5pt" height="18"> <td style="HEIGHT: 13.5pt" colspan="11" height="18">首先,通过 Server.Transfer 引导到另一页面保留服务器资源,通过更改服务器端“焦点”和传输请求来代替</td> </tr> <tr style="HEIGHT: 13.5pt" height="18"> <td style="HEIGHT: 13.5pt" colspan="11" height="18">告诉浏览器重定向,这就意味着你不会占用较多的 HTTP 请求,因此这可以减轻服务器的压力,使你的服务器</td> </tr> <tr style="HEIGHT: 13.5pt" height="18"> <td style="HEIGHT: 13.5pt" colspan="2" height="18" x:str="运行更快。 ">运行更快。 </td> </tr> <tr style="HEIGHT: 13.5pt" height="18"> <td style="HEIGHT: 13.5pt" colspan="9" height="18" x:str="不过,请注意,由于 "transfer" 只能在同一服务器端的同一站点间运行,所以你不能用 ">不过,请注意,</td></tr></tbody></table>

您可能感兴趣的文章:
Server.Transfer()与Response.Redirect()区别分析
Server.Transfer和Response.Redirect的区别
Asp.net 页面导航的几种方法
NET MVC与WebForm的区别
asp.net页面跳转的多种方法
Asp.net 页面导航的几种方法与比较
ASP.NET四种页面导航方式的比较与选择
ASP.NET页面间值传递的五种方法
asp.net页面间传值方法大全
PHP Header 页面跳转注意事项

[关闭]
~ ~