Response.Redireact(" abc.aspx");之间的区别是什么?和Server.Transfer(" abc.aspx"); [英] What is the Difference between Response.Redireact("abc.aspx"); and Server.Transfer("abc.aspx");

查看:99
本文介绍了Response.Redireact(" abc.aspx");之间的区别是什么?和Server.Transfer(" abc.aspx");的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我解决这两个陈述之间的区别

Response.Redirect(abc.aspx);



Server.Transfer(abc.aspx);

Kindly help me to solve out the difference between these two statements
Response.Redirect("abc.aspx");
and
Server.Transfer("abc.aspx");

推荐答案

检查出来: http://www.developer.com/article.php/3299641 [ ^ ]


谷歌上有很多关于此的内容。看看以下链接

Link 1




Link 2



Link 3
There are lot more available on google about this.Have a look to the following links
Link 1


Link 2

Link 3


您好,

Response.Redirect为您提供往返服务器的往返服务虽然server.transfer没有。还有Response.redirect重定向html页面以及aspx页面,而server.transfer只将控件转移到aspx页面......



这可以通过以下示例来解释



假设您在Default.aspx中输入了一些数据并单击了一个将重定向的按钮你对其他一些页面说Default2.aspx什么server.transfer将在这里重新设计Default.aspx就像Default2.aspx,即它将Default2.aspx中的所有控件传递给Default.aspx并将你的Default2.aspx显示到你的ur浏览器,但如果你看看你的网址,你会发现你仍然在Default.aspx,但在你的浏览器中看到Default2.aspx ...



Do一旦你发现它有用,给我回答评价



谢谢和问候

基数:玫瑰:
Hello,
Response.Redirect provides you a roundtrip to the server while server.transfer does not.Also Response.redirect redirects both the html page as well as the aspx page where as the server.transfer transfers the control only to the aspx pages...

This can be explained with the help of following example

say suppose ur in Default.aspx u have entered some data and clicked a button which will redirect u to some other page say Default2.aspx what server.transfer will do here is redesign Default.aspx just like Default2.aspx i.e. it passes all the control present in Default2.aspx to Default.aspx and will show u Default2.aspx into ur browser but if u look at ur url you will find that you are still at Default.aspx but havin a view of Default2.aspx in your browser...

Do rate my answer once you find it useful

Thanks & Regards
Radix :rose:


这篇关于Response.Redireact(" abc.aspx");之间的区别是什么?和Server.Transfer(" abc.aspx");的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆