Server.Transfer Vs. Response.Redirect

前端 未结 16 2347
夕颜
夕颜 2020-11-22 14:38

What is difference between Server.Transfer and Response.Redirect?

  • What are advantages and disadvantages of each?
  • When is one
16条回答
  •  情话喂你
    2020-11-22 15:16

    Response.Redirect redirects page to another page after first page arrives to client. So client knows the redirection.

    Server.Transfer quits current execution of the page. Client does not know the redirection. It allows you to transfer the query string and form variables.

    So it depends to your needs to choose which is better.

提交回复
热议问题