If I do the test you suggested it works as expected. and
yes PubId is a number.
The If statement works correctly, if pubID > 100 I stay on
my IIS server, if PubID < 100 I redirect to another IIS
server someplace else. the problem occurs when PubId < 100
and I redirect using this line of code:
Response.Redirect "http://www.domain2.com/VDIR2/table.asp"
& "?PubID=" & PubID & "&PubName=" & PubName
When PubId < 100 I see In the IE address bar the redirect
above with the acception that
www.domain2.com is replaced
with
www.domain1.com.
domain1 is my domain, It points to my IIS server, domain2
is somebody elses IIS server that I need to redirect to.
When PubID < 100 and things fail, I merely need to edit
the address bar URL by changing domain1.com to domain2.com
and hit return. Then I get what I want.
So some how even though I redirect to domain2 something is
replacing it with domain1.
-----Original Message-----
Gazing into my crystal ball I observed "Paul"
<an*******@discussions.microsoft.com> writing in
news:06ce01c39447$98c015a0$a*******@phx.gbl:
I'm not getting the results I want when I use
Response.Redirct in a ASP page.
I enter this line of code in a asp page from
domain1.com.
Response.Redirect "http://www.domain2.com/VDIR2/table.asp" & "?PubID=" & PubID & "&PubName=" & PubName
The query string is data to open a DB. the page
displays but the DB does not open.
That's because when it redirects I notice in the
address bar of IE that it looks like this
http://www.domain1.com/VDIR1/table.asp?
PubID=100&PubName=thename
I told it to redirect to domain2 but I see domain1 in
the address bar.
If I type out the URL to domain2 with all the params
everything works fine, so the problem is with how I am
redirecting there.
The redirect above is inside an IF statement which says
if the PubID is less then 100 I go to the table.asp page
on domain2.com else I stay with table.asp on domain1.com
Any ideas
PAul
What happens if you response.write in the IF statement?
if pubid < 100 then
response.write "I am going to domain2"
else
response.write "I staying right here"
end if
Is Pubid really a number, or is it a string? If it's a
string, convert itto a number, and then test it.
--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
.