Response.Redirect Thread aborted

G

Guest

I'm trying to response.redirect to another page on a button click event and I get an error message stating that the thread was being aborted (if I trap for the error that is...)

I've researched this a bit and see that this error is supposed to happen in response.redirect, but it's not in a Try Catch statement for me so I don't know why it won't perform the redirect

When the button is clicked the page is simply reloaded with a white screen, and the URL never changes

I've tried overloading Response.redirect and setting the endResponse parameter to False, but all that does is simply reload the exact same page I'm trying to leave (URL stays the same and the page is simply reloaded.)

Server.Transfer seems to work in the fact that the page is changed, but I need the URL to change as well, since there are new parameters I need to put in there

The code is as simple as this
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Clic

Response.Redirect("default.aspx?ID=123456"

End Su

Now what's interesting is that everything works fine on my Windows 2003 Server dev enviroment, but it won't redirect when I put this into production on Windows 2000 Server, so I'm at a complete loss here

Any ideas?
 
C

Calvin Luttrell/ProjectThunder.com

Brian,

I remember having this issue when I had some other code running after the redirect took place. I think it was a error handler or something like that. See if you can duplicate the issue in a different project that simply does that one line of code. Then use the process of elimination by copying in code to the other project to determined what is causing the error.

-Calvin Luttrell
ProjectThunder.com
 
G

Guest

Calvin

Thanks for your suggestion. As a last resort though I just considered the page to be corrupted with some sort of problem and copied all the html & vb out of the page into a new .aspx page that was added to the project

After that everything seems to work again, so I'm not sure what to chalk this one up to

~Brian
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top