Response.Redirect(url, bool)
-
hi the second parameter suppose to: Indicates whether execution of the current page should terminate. but what does this mean ?? where i have to realty use the second parameter ?? thank you
When you get mad...THINK twice that the only advice Tamimi - Code
-
hi the second parameter suppose to: Indicates whether execution of the current page should terminate. but what does this mean ?? where i have to realty use the second parameter ?? thank you
When you get mad...THINK twice that the only advice Tamimi - Code
Tamimi - Code wrote:
Indicates whether execution of the current page should terminate.
When we use
Response.Redirect
, it tries to end the current request and start a new request.The second parameter isendResponse
, when it is set totrue
, it callsResponse.End
method, which throws an exception when it gets completed. This is bydefault behaviour of this method.This method is provided only for compatibility with ASP. So it is recommended to set it false, to avoid the exception because it is not good for the website performance. If you still want to set ittrue
. Then you should firts callCompleteRequest()
method. It will avoid calling end method.Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
Check my latest Article :ViewState - Various ways to reduce performance overhead -
Tamimi - Code wrote:
Indicates whether execution of the current page should terminate.
When we use
Response.Redirect
, it tries to end the current request and start a new request.The second parameter isendResponse
, when it is set totrue
, it callsResponse.End
method, which throws an exception when it gets completed. This is bydefault behaviour of this method.This method is provided only for compatibility with ASP. So it is recommended to set it false, to avoid the exception because it is not good for the website performance. If you still want to set ittrue
. Then you should firts callCompleteRequest()
method. It will avoid calling end method.Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
Check my latest Article :ViewState - Various ways to reduce performance overhead:)
When you get mad...THINK twice that the only advice Tamimi - Code