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

problems with response.redirect

Status
Not open for further replies.

hinchdog

Programmer
Feb 14, 2001
380
US
i have a wierd problem. i have a banner counter page that takes parameter from the query string, searches a database for the appropriate url to redirect to, then redirects the page. for some reason it doesn't work the first time..i always get a "page can't be displayed" message. but when i refresh the error page, it redirects fine and every time after that it works until i restart my computer, then the same problem. here's my code..(btw i'm using Javascript)

Response.Buffer=true;
Response.Expires=0;

... database call to get url ...

Response.Clear;
Response.Redirect (sURL) ;
Response.End;
 
Hmmm...

I would try using Response.Write(sURL) to make sure that the string that you're getting from the database is a valid URL.

So try this and comment out Response.Redirect (sURL) so that it doesn't crash the page.

Just try to localize the problem to make sure it really is related to Response.Redirect..

Good luck.

BTW, it's great to see someone using JScript with ASP (like me). It seems that 99.9% out there is VBScript :) <Dmitriy>
dbrom@crosswinds.net
 
yeah, i think it was something else in my code. i had duplicate includes. when i removed one it worked. so thanks anyways. viva jscript!

-hinch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top