473,378 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 3245
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kerri | last post by:
Hi, I have do some Redirects in my applitcaion. For example, when the use rhas logged in successfully I redirect them to a different page. In my Redirect all I was doing was a.. ...
5
by: karunakar | last post by:
Hi all I have a page where I am trying to do a Response.Redirect and I get the next error message: 'Thread was being aborted' How can I solve this problem? Thanks in advance Karunakara Rao.
1
by: VB Programmer | last post by:
I have a default.aspx page that simply does this (in the "Try" block): Response.Redirect("MyStartPage.aspx") I keep getting this exception on this line: "System.Threading.ThreadAbortException:...
1
by: GSK | last post by:
I am logging the following error when re-directing via Response.Redirect: "Thread was being aborted at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object...
1
by: Henry | last post by:
Hello, I have a question about ASP.NET process. In this case: Try 'SOME CODE Response.Redirect("some_asp_page.aspx") Catch obj_Exception as Exception Throw obj_Exception
1
by: Vi | last post by:
Hi, I have a try block in which I execute a Page.Response.Redirect("myPage.aspx"); This statement always generates the exception: "Thread was being aborted" and the execution continues in the...
10
by: Niggy | last post by:
I get an error - any help appreciated. System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object...
1
by: Don | last post by:
When we redirect a user to a new page, we generally want the processing of the current page to end right then. As I understand it, the runtime accomplishes this by generating a ThreadAbort...
4
by: Vi | last post by:
Hi, I have an <asp:Button> control on a page. When it is clicked, I run a db stored procedure and then I want to go to the next page by executing a Response.Redirect("NextPage.aspx?id=" + myID)....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.