470,615 Members | 2,182 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,615 developers. It's quick & easy.

Response.Redirect Thread aborted

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?
Nov 18 '05 #1
2 3103
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

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.Click

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

End Sub

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?

Nov 18 '05 #2
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
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Kerri | last post: by
1 post views Thread by VB Programmer | last post: by
1 post views Thread by Henry | last post: by
10 posts views Thread by Niggy | last post: by
1 post views Thread by Don | last post: by
4 posts views Thread by Vi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.