Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response.Redirect suddenly stops working!

Status
Not open for further replies.

rhmb

IS-IT--Management
Apr 9, 2009
11
GB
I have a response.redirect in my asp page to redirect to another page.
When i updated my website a little while ago, my response redirect stopped working, although i did not make any changes to the asp page. I then changed it to a server.transfer command and i thought no more about it. I have now updated my website again (again not changing the asp pages) and neither the server.transfer or the reponse.redirect commands will redirect the page.

I have three asp pages none of which are redirecting. (the asp page opens instead of the page that i want to redirect to)

I use the same code for each (although redirecting to a different page:

On Error Resume Next
If not Mail.Send Then
ErrStr = Err.Description
Response.Write "Error(" & ErrNum & "): " & ErrStr
Else
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso_OpenTextFile("c:\colexcallback.txt", ForAppending, True)
f.Write Session("strWriteData")
f.Close
Response.Redirect "cbresponse.html"
End If
End If
%>

Any ideas on why this keeps stopping working would be greatly appriciated.

thanks
Ruth
 
First this is an ASP.NET forum.
Second, you say you updated your site so something changed. Did you move the file you are redirecting to? Have you traced/debugged your code to be sure the code you expect to run is being hit? Ii would check your IF statement.
 
being that this is classic asp, try forum333.
asp (scripting) and asp.net (object oriented) are completely different.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top