ThreadAbortException and what to do

A

Antonio

Hi, i have in a block of code a Response.End which throws a
threadabortexception.

Here is what happens- a user selects from a drop down list a item and
the selectedindexchanged event starts a process and during that process
the Response.End is used. After that process starts I want to change
the selectedindex = 0, but the exception prevents me from doing so.

I try to catch ThreadAbortException and even put selectedindex = 0 in
there but it does not work. I put selectedindex = 0 before I call the
process but that doesn't change the selectedindex back to 0 either.

do you have a suggestion?
 
B

Brock Allen

Don't catch the ThreadAbortException -- if you see it, ignore it. It's how
Response.End() is implemented.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top