Hi,
What is the difference between Server.Transfer VS server.Execute in ASP.NET.
Server.Transfe VS server.Execute
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Aug 16, 2011, 7:42 AM EDT
Server. Transfer takes the control execution of the page to the new page and thereafter it doesn't return automatically to the original page.
The transfer happens at the server side and the client browser is not aware of the change and hence will not update the URL.
Server. Execute actually executes the specified page and then returns back to the original page. This can be used in scenarios where you want to go to a specific page, execute some thing and then come back to the original page.
In the attached program we will see that when we click transfer button url is not changed but it goes to the transfer.aspx.when we click execute button here also url is not changed but the controls such as textbox and two button are seen with respect to the label control which is present in the execute.aspx page.Thanks
If this post helps you mark it as answer
Satyapriya NayakRank #47 · 31.5K reputationPosted Aug 29, 2011, 3:33 AM EDT
If this post helps you mark it as answer
Thanks