When Should I Use Response.Redirect(url, true)?

前端 未结 5 1499
夕颜
夕颜 2020-12-03 09:32

I\'m redirecting to an Error page with a prettified error message in my Application_Error, in Global.asax.

At the moment it says:

Respon         


        
5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 10:14

    Enter image description here

    Response.Redirect(URL,false): The client is redirected to a new page and the current page on the server will keep processing ahead.

    Response.Redirect(URL,true): The client is redirected to a new page, but the processing of the current page is aborted.

    You can also see this video which demonstrates the differences Response.Redirect ( False vs True) ASP.NET Interview questions with answers.

提交回复
热议问题