What is difference between Server.transfer and
Response.redirect ?

Answers were Sorted based on User's Feedback



What is difference between Server.transfer and Response.redirect ?..

Answer / sri

server.trasfer directly transfer the execution of a page to
another page without taking the client into the
picture.while response.redirect sends the response to the
client browser and directs him to make a request to call a
page( called round trip).it is better to use
server.transfer when you do not want to execute code on
client.

Is This Answer Correct ?    29 Yes 5 No

What is difference between Server.transfer and Response.redirect ?..

Answer / hema

Server.Transfer redirects directly to the new url. It does
not take a round trip. where as response.redirect tells the
client to make a request to the new url. this takes a round
trip. so it takes so much time. so server.transfer is
better when compared to response.redirect

Is This Answer Correct ?    17 Yes 4 No

What is difference between Server.transfer and Response.redirect ?..

Answer / yugandhar reddy

Request.Redirect tranfers the user to the new page.The new
page can be in the same application or outside the
application.Browser upgradation of new url i.e round trip
to client takes place.It cannot take the current form
control values to the new page byitself.using querystring
only it can take.

ex: Request.Redirect("Default2.aspx");
where as Server.Transfer redirects to the new page that
should be present in the same application.single trip takes
place i.e no browser upgradation of new url.It can take
current for control values to the new page using
preserveform attribute.

ex : Server.Transfer("Default2.aspx");

Is This Answer Correct ?    9 Yes 0 No

What is difference between Server.transfer and Response.redirect ?..

Answer / hema

Server.transfer transfers to a page on the server only
whereas response.redirect redirects to any page. In
server.transfer, the new URL is not displayed. whereas in
response.redirect the new url is displayed.

Is This Answer Correct ?    10 Yes 2 No

What is difference between Server.transfer and Response.redirect ?..

Answer / kiran kumar

Server.Transfer: - This redirects the client with in the
same application ie, from one ASP page to other ASP page
with in the application. This will not update the history.

Response.Redirect: - This redirects the client to the other
URL ie, from one ASP page to other applications page. This
will update the history.

Is This Answer Correct ?    7 Yes 1 No

What is difference between Server.transfer and Response.redirect ?..

Answer / rj

without query string we can access previous page control
values in server.transfer method. Round trip not allowed

In the response.redirect method using query string we can
access the previous page controls values. Round trip allowed

Is This Answer Correct ?    3 Yes 0 No

What is difference between Server.transfer and Response.redirect ?..

Answer / khaleek ahmad

1) In Response.Redirect previous page is not accessible
while in Server.Transfer it is optional.
Server.Transfer(URL,bPreserveForm);

2) Server.Transfer use only within the server.But
Response.Redirect can be use ouside the server.But it should
be a full path.

For more detail please see at
http://interview-preparation-for-you.blogspot.com/2010/12/difference-between-servertransfer-and.html

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More ASP Interview Questions

What does asp stand for in technology?

0 Answers  


Explain the life cycle of asp page.

0 Answers  


. which tag i need to use manually to bind columns in a datagrid ?

0 Answers  


Name the collections of session object?

0 Answers  


very Simple Question i Know But I Cant Do It public int Y { get { return _y; } set { _y = value; } } How Can i Check for Value Y in Accessories Say if Y > 5

0 Answers  






What are the advantages of using ASP?

1 Answers  


What are the methods in Session Object?

1 Answers   BirlaSoft,


Is asp still used?

0 Answers  


What is the difference between sap r/2 and r/3

0 Answers  


using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.SqlClient; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { SqlConnection cn = new SqlConnection("Data Source =Prg1; Initial Catalog= DBTEST; Integrated Security = True"); cn.Open(); DataSet ds= new DataSet (); string str = "DB_test"; SqlDataAdapter da = new SqlDataAdapter(str, cn); da.SelectCommand.CommandType = CommandType.StoredProcedure; da.SelectCommand.CommandText = str; da.Fill(ds); Session["test"] = ds; } protected void btnSubmit_Click(object sender, EventArgs e) { DataSet ds1 = new DataSet(); ds1= (DataSet ) Session ["test"]; DataTable dt = ds1.Tables[0].Clone(); DataRow[] dr; string[] sqlInput = txtNo.Text.Split("-".ToCharArray ()); if (txtNo.Text != "" && txtWeight.Text != "") { if (sqlInput.Length > 1) { string query = ("t1 <=" + sqlInput[0] + " and " + "t2 >=" + sqlInput[1]); dr = ds1.Tables[0].Select(query); } else { string query = ("t1 <=" + txtNo.Text + "and " + "t2 >=" + txtNo.Text); dr = ds1.Tables[0].Select(query); } foreach (DataRow dr1 in dr) { dt.Rows.Add(dr1.ItemArray); } int i = Convert.ToInt32(dt.Rows[0] ["zone"].ToString()); DataTable dt1 = new DataTable(); DataRow[] dr2; dt1 = ds1.Tables[1].Clone(); dr2 = ds1.Tables[1].Select("weight=\'" + txtWeight.Text + "\'"); foreach (DataRow dr3 in dr2) { dt1.Rows.Add(dr3.ItemArray); } DataRow[] dr4; DataTable dt2 = ds1.Tables[2].Clone(); dr4 = ds1.Tables[2].Select(("weight=\'" + txtWeight.Text + "\'")); foreach (DataRow dr5 in dr4) { dt2.Rows.Add(dr5.ItemArray); } int j = Convert.ToInt32(dt.Rows[0] ["days"].ToString()); lbl.Text = dt1.Rows[0][i].ToString(); lbldays.Text = dt2.Rows[0][j].ToString(); } else { } } } ============================================================ ================ CREATE PROCEDURE DB_test AS BEGIN DECLARE @tb1 table ( t1 bigint, t2 bigint, zone bigint, days bigint ) insert into @tb1(t1,t2,zone,days) select (case when(charindex("-",No)-1>0) then convert (bigint,substring(No,1,charindex("-",No)-1)) else No end) as t1, (case when(charindex("-",No)-1>0) then convert(bigint,substring(No,charindex("-",No) +1,len(No))) else No end) as t2, Zone as zone, Days as days from [926] select * from @tb1 select * from zone select * from days end GO

0 Answers  


Any one tell me what GOOGLE GEARS and how to use it ?

1 Answers   HCL,


What does asp mean in technology?

0 Answers  


Categories