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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response.Redirect compatibility ?

Status
Not open for further replies.

welshone

Programmer
Jul 30, 2001
414
GB
I am trying to run the following code and it doesn't seem to redirect.
any ideas ?

<%
If numberOfRecords = 1 Then

Response.Redirect(&quot;moredetails.asp&quot;)

end if
%>
 
Try it without the parenthesis. Sometimes it works enclosed and other time they interfere.
 
looks ok to me - maybe numberOfRecords does not = 1?
I usually don't have the parentheses around my statement. Try:
Response.Redirect &quot;moredetails.asp&quot; -----------------------------------------------------------------
DIM bulb
SET bulb = NEW brain

mikewolf@tst-us.com
 
I think you have a little problem your flag.
it works on me this way:

<%
numberOfRecords=1
If numberOfRecords = 1 Then
path=server.mappath(&quot;/&quot;) & &quot;/moredetails.asp&quot;
Response.Redirect(path)
end if
%>

-good luck!
 
I have sorted it.
Problem is I have a response.write earlier in the page.
if that is the case you need to :

response.clear
then response.redirect
then response.end

thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top