IdHttp Post问题
今天使用IdHTTP控件,调用POST,提交数据到ASP网站,发现ASP页面获取不到这些提交的参数,请高手指点一下
以下是C++的代码
TIdHTTP *IdHTTP=new TIdHTTP(NULL);
IdHTTP->HandleRedirects=true;
AnsiString strRetData="";
TStringStream *ResponseStream=new TStringStream("");
AnsiString strURL="http://localhost/Register.asp";
TIdMultiPartFormDataStream *s=new TIdMultiPartFormDataStream();
s->AddFormField("Name","123");
s->AddFormField("Telphone","123456789");
s->AddFormField("EMail","123@qq.com");
IdHTTP->Post(strURL,s,ResponseStream);
strRetData=ResponseStream->DataString;
ShowMessage(strRetData);
delete ResponseStream;
delete s;
delete IdHTTP;
dim strName,strTelphone,strEMail
strName=request.QueryString("Name")
strEMail=request.QueryString("EMail")
strTelphone=request.QueryString("Telphone")
if strName="" or strTelphone="" or strEMail="" then
response.write "Data Error"
response.end
end if