Pages

Monday, May 27, 2013

difference between Server.Redirect and Response.Redirect?

server.transfer:- there is no round trip .it is directly go to the server but
response.redirect :-In response.redirect round trip is there .

roundtrip means :- request and response (the complete cycle is called round trip )


what is response.redirect in asp.net?

Ans:A web page sometimes changes locations. It is important to redirect the old address to the new one. This makes links pointing to the old address still work

 

Sample code: 

<asp:Button ID="btn" runat="Server" Text="SUBMIT"/>protected void btnNewEntry_Click(object sender, EventArgs e){
    Response.Redirect("newpage.aspx");}

No comments:

Post a Comment