Click here to Skip to main content
15,895,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

my code is like

Response.Redirect (Login.aspx, true);

when the code reads the line Response.Redirect (Login.aspx, true);

then exception raised as thread was being aborted and goes to catch block.


i have tried with
C#
Response.Redirect (Login.aspx, false);

but i don't want to set as false.
please help me
Posted
Comments
bbirajdar 13-Aug-12 3:30am    
Not enough information..

1 solution

Hi,
This is a ThreadAbortException.It's a special exception that is automatically rethrown at the end of every catch block, unless you call Thread.ResetAbort()
There is only one solution of this problem use
C#
Response.Redirect (Login.aspx, false);

ASP .Net itself handles this exception and calls ResetAbort to continue processing.



--Amit
 
Share this answer
 
Comments
BillW33 13-Aug-12 14:55pm    
Good explanation, +5
_Amy 14-Aug-12 0:07am    
Thanks CIDev. :)

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