Forums
This topic is locked
response.redirect
26 Dec 2003 04:11:00 hy lo posted:
Hi, was wondering if anyone can help. i'm trying to use this method in the following situation.
users will submit data to my page "collection.asp", from which i will extract the different fields. I will then have to use the data collected to pass to another url "target.SendMessage", which processes the information passed over and returns me some codes on whether the transaction has been successful or not (e.g. "target.SendMessage" is a service provided by another company and some processing is done on their side, after which they will return some simple codes on the "target.SendMessage", page itself, like "10001", "1002" etc to indicate if there was success in the processing of the information that i submitted.) It is these codes that i cannot access if i use response.redirect or server.execute methods which i need to retrieve in my original page "collection.asp"
the problem i have is that i can pass the values over to "target.SendMessage" via the query string method, but i would like to do it something like the Frm Post method instead, so the information is not displayed in the address bar. Is this possible?
I also have no idea how i can retrieve the success codes (which are actually on "target.SendMessage" in "collection.asp" so that i can use it in some database updating.
The sample codes are as follows:
-------------------------------------------
"collection.asp"
<%@LANGUAGE=VBSCRIPT%>
<%
' Begin buffering the HTML
' Note this MUST happen before the initial <HTML> tag.
Response.Buffer = True
%>
<html><head>
<title>SM redirect.asp</title>
</head><body bgcolor="#FFFFFF">
<%
stURL="target.SendMessage"
DID=Request.Form("dID"
Dpd=request.Form ("Dpd"
Num=request.Form("Number"
cqDID=request.Form ("stID"
Msg = request.Form ("Message"
%>
<p>
<%
endURL=endURL & "?DID=" & DID
endURL=endURL & "&Pd=" & Dpd
endURL=endURL & "&Num=" & Num
endURL=endURL & "&Msg=" & Msg
fullURL=stURL&endURL
%>
<p>
<%
response.redirect fullURL
%>
------------------------------------------------------------------
"target.SendMessage"
this returns codes like "10001", "10002"
------------------------------------------------------------------
I'm still using ASP 2.0, so is there any other way to do this? besides upgrading to ASP 3.0 and using the Server.Transfer or Server.Execute methods (btw - i would also appreciate it if someone could let me know how to use these 2 methods)
Help!!!!
Thanks