Indy TidHTTP and POST to ASP page problems
From: Anders Buch (dont_at_write.me)
Date: 10/26/04
- Next message: Peter Piper: "Re: Win API"
- Previous message: Jamie: "Re: Missing Combo Box -- Why?"
- Next in thread: Jamie: "Re: Indy TidHTTP and POST to ASP page problems"
- Reply: Jamie: "Re: Indy TidHTTP and POST to ASP page problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 26 Oct 2004 10:36:17 +0100
Hi
In need to post two values to an ASP page on IIS that looks like this
(simplified):
<%
...
code to log the hit goes here
...
Response.Write ("CustNo Content : " & Request.Form("CustNo") & "<p>")
Response.Write ("Content Content : " & Request.Form("Content") & "<p>")
%>
I use Delphi 7 and Indy 9.0.15. Here is what I tried:
var
idHTTP: TidHTTP;
FormData: TIdMultiPartFormDataStream;
ReturnText: string;
begin
idHTTP:=TidHTTP.Create(nil);
FormData:=TIdMultiPartFormDataStream.Create;
FormData.AddFormField('CustNo','111');
FormData.AddFormField('Content','222');
ReturnText:=idHTTP.Post('http://mysite.com/somepage.asp',FormData);
// Of course I use the right URL in my code :-)
IIS does receive my post but there are no values in the Form fields CustNo
and Content?
I am sure I must be missing something simple (or complicated :-)) as I am
quite new to HTTP and ASP.
Any help would be much appreciated. Thanks
Anders Buch
Denmark
- Next message: Peter Piper: "Re: Win API"
- Previous message: Jamie: "Re: Missing Combo Box -- Why?"
- Next in thread: Jamie: "Re: Indy TidHTTP and POST to ASP page problems"
- Reply: Jamie: "Re: Indy TidHTTP and POST to ASP page problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|