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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top