Click here to Skip to main content
15,868,154 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Can anyone practically guide me as to what is the difference between Response.Redirect - True / False, I mean

C#
Response.Redirect('Default.aspx",True)

V/s
C#
Response.Redirect('Default.aspx",False)


What I have tried:

Need clarification on the doubt.
Posted
v2

Redirects a client to a new URL.Specifies the new URL and whether execution of the current page should terminate. for more info please search by Google.
 
Share this answer
 
 
Share this answer
 
Response.Redirect(Default.aspx,True) V/s Response.Redirect(Default.aspx,False)



If you are processing page "A" an then you issue a redirect

Response.Redirect('Default.aspx",True)

The client will be sent the redirect for the new page and Page "A" will immediately stop processing as a thread abort will occur. This is the default behavior of a redirect.

If you issued the redirect as

Response.Redirect('Default.aspx",False)

Then the client will be sent the redirect for the new page, but Page "A" will be allowed to continue processing. Perhaps page "A" has cleanup work to do or something. The client will never see the results from page "A" as they were redirected.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900