ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
What is the difference between Server.Transfer and 
Response.Redirect?
 Question Submitted By :: Priya
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between Server.Transfer and Response.Redirect?
Answer
# 1
Server.Transfer transfers the currnet context of the page to
the next page and also avoids double roundtrips. Whereas
Response.Redirect could only pass querystring and also
requires roundtrip.
 
Is This Answer Correct ?    3 Yes 0 No
Siddhu
[H-line Soft]
 
  Re: What is the difference between Server.Transfer and Response.Redirect?
Answer
# 2
Hai..,
Server.Transfer:
In Server.Transfer Page their is no round trim between 
client and server.if u requested a  page to server it will 
directly taken from the server itself

Response.Redirect:
-Round Trim between client and server:
- if u request a page
Example:
client-->server-->client
 
Is This Answer Correct ?    2 Yes 2 No
Shiva
 
 
 
  Re: What is the difference between Server.Transfer and Response.Redirect?
Answer
# 3
Server Transfer simply tranfer execution to another page . 
This doesnt require any information to be sent to the 
browser that is it all occors on the server without the 
users knowledge, doesnt update the client's URL history 
list or current url
Response Redirect method sends HTTP information to the 
browser instructing it to go to another page perform round 
trip back to the client when the client's browser is 
redirected to the new page.The user's browser history list 
is updated to reflect the new address.
 
Is This Answer Correct ?    2 Yes 1 No
Kvnvani
 
  Re: What is the difference between Server.Transfer and Response.Redirect?
Answer
# 4
Response.Redirect simply sends a message down to the 
browser, telling it to move to another page. So, you may 
run code like: 

Response.Redirect("WebForm2.aspx")
or

Response.Redirect("http://www.karlmoore.com/")
to send the user to another page.

Server.Transfer is similar in that it sends the user to 
another page with a statement such as Server.Transfer
("WebForm2.aspx"). However, the statement has a number of 
distinct advantages and disadvantages.

Firstly, transferring to another page using Server.Transfer 
conserves server resources. Instead of telling the browser 
to redirect, it simply changes the "focus" on the Web 
server and transfers the request. This means you don't get 
quite as many HTTP requests coming through, which therefore 
eases the pressure on your Web server and makes your 
applications run faster.

But watch out: because the "transfer" process can work on 
only those sites running on the server, you can't use 
Server.Transfer to send the user to an external site. Only 
Response.Redirect can do that.

Secondly, Server.Transfer maintains the original URL in the 
browser. This can really help streamline data entry 
techniques, although it may make for confusion when 
debugging.

That's not all: The Server.Transfer method also has a 
second parameter—"preserveForm". If you set this to True, 
using a statement such as Server.Transfer("WebForm2.aspx", 
True), the existing query string and any form variables 
will still be available to the page you are transferring to.

For example, if your WebForm1.aspx has a TextBox control 
called TextBox1 and you transferred to WebForm2.aspx with 
the preserveForm parameter set to True, you'd be able to 
retrieve the value of the original page TextBox control by 
referencing Request.Form("TextBox1").

This technique is great for wizard-style input forms split 
over multiple pages. But there's another thing you'll want 
to watch out for when using the preserveForm parameter. 
ASP.NET has a bug whereby, in certain situations, an error 
will occur when attempting to transfer the form and query 
string values. You'll find this documented at 
http://support.microsoft.com/default.aspx?id=kb;en-
us;Q316920.

The unofficial solution is to set the enableViewStateMac 
property to True on the page you'll be transferring to, 
then set it back to False. This records that you want a 
definitive False value for this property and resolves the 
bug.

So, in brief: Response.Redirect simply tells the browser to 
visit another page. Server.Transfer helps reduce server 
requests, keeps the URL the same and, with a little bug-
bashing, allows you to transfer the query string and form 
variables.
 
Is This Answer Correct ?    3 Yes 1 No
Swati
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
What is role manager work in web.config? how to restrict perticular pages from the users using the role manager? Infosys1
What is interval time of GC in .net  2
I have to send data throug querystring from one page to another. But it should not be displayed in URL. How it is possible? EMR5
What method do you use to explicitly kill a users session?  1
What layout mode is the default when a new Web Form is created? a) GridBagLayout b) GridLayout c) FlowLayout d) FormLayout Syntax-Softtech2
What is boxing and unboxing ? Accenture6
what is diffgram ?  1
which is faster ArraytList Or Collection ? how? hows the Hashing works internally ? Emphasis2
Types of object in asp ? Accenture1
How many types of sessions are there?  2
How do you perform validations ? Microsoft1
How to identify host of my system? How to identify servername of my system? How to identify domainname of my system?  2
what is the dllhell? why we use the dllhell?  4
what is view state  4
Is overloading possible in web services? Microsoft2
What is Http handler? Accenture4
how to create bin folder in asp.net2.0  7
can i use store procedure in disconnected mode? give me answer  2
What is SQL injection?  1
.net allows which inheritence AG-Technologies5
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com