DELPHI中的代码,用BUTTON1触发procedure TForm1.Button1Click(Sender: TObject);
var
url:string ;
temp_response:Tstringstream;
temp:TStringList;
begin
temp_response:=Tstringstream.Create('');
try
temp:=TStringList.Create;
try
url:='http://192.168.1.41/test.asp';
temp.Add('title=hello,world');
//IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
idhttp1.Post(url,temp,temp_response);
memo1.Lines.Text:=temp_response.DataString;
temp.Free;
temp_response.Free;
except
application.MessageBox('correct happened!','wrong',MB_iconerror+MB_OK);
temp.Free;
close;
end;
except
application.MessageBox('correct happened!','wrong',MB_iconerror+MB_OK);
temp_response.Free;
close;
end;
end;
我想在ASP面页就是test.asp中显示出 temp.Add('title=hello,world')中的内容我在ASP面页中的代码如下:<body>
hello world!!
<form name="form1" method="post" action="test.asp"> <input name="title" type="text" id="title">
<input type="submit" name="Submit" value="提交">
<br>
<% response.Write("content is:"&request.Form("title")) %></form>
</body>----------------
我也是照着别人的例子来做的,在test.asp中没有显示出title的'hello,world'内容。
而在Delphi中的memo1可以显示整个test.asp的代码,其中content is: hello,world 有显示出来。我也不知道这样是不是发送成功?请大家指导一下,我该怎么写这个test.asp这边的代码可以使我要发送的内容在网页上显示出来。先谢过了大家啊。祝元旦快乐!!
var
url:string ;
temp_response:Tstringstream;
temp:TStringList;
begin
temp_response:=Tstringstream.Create('');
try
temp:=TStringList.Create;
try
url:='http://192.168.1.41/test.asp';
temp.Add('title=hello,world');
//IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
idhttp1.Post(url,temp,temp_response);
memo1.Lines.Text:=temp_response.DataString;
temp.Free;
temp_response.Free;
except
application.MessageBox('correct happened!','wrong',MB_iconerror+MB_OK);
temp.Free;
close;
end;
except
application.MessageBox('correct happened!','wrong',MB_iconerror+MB_OK);
temp_response.Free;
close;
end;
end;
我想在ASP面页就是test.asp中显示出 temp.Add('title=hello,world')中的内容我在ASP面页中的代码如下:<body>
hello world!!
<form name="form1" method="post" action="test.asp"> <input name="title" type="text" id="title">
<input type="submit" name="Submit" value="提交">
<br>
<% response.Write("content is:"&request.Form("title")) %></form>
</body>----------------
我也是照着别人的例子来做的,在test.asp中没有显示出title的'hello,world'内容。
而在Delphi中的memo1可以显示整个test.asp的代码,其中content is: hello,world 有显示出来。我也不知道这样是不是发送成功?请大家指导一下,我该怎么写这个test.asp这边的代码可以使我要发送的内容在网页上显示出来。先谢过了大家啊。祝元旦快乐!!
解决方案 »
- 关于Delphi的 .exe 加密的一个问题,各位简单看下
- 存储过程,参数使用
- 如何获取在所有控件上的键盘信息
- 把fastreport预览后生成的报表导成WORD不知可不可以,纯属议论。请各位说说自已这方面的高招
- InstallShield for D7配置的ODBC是不是不能包含中文目录?
- delphi 如何保护内存中敏感性数据
- 关于delphi接口 自动生成骨架代码
- 求教:有没有什么方法可以在程序运行时点击DBGrid的tittle,按指定字段排序?
- 请问如何找到oracle call interface(OCI)的调用说明和完整的中文文档(English也行)?
- DelphiWeb编程专家请进!(高分:100)
- 关于tclienthandlethread的问题,线程的问题,送分50
- 我在网上找的一个代码,可是有个问题,帮帮我吧看一下
hello world!!
<form name="form1" method="post" action="test.asp">
<input name="title" type="text" id="title">
<input type="submit" name="Submit" value="提交">
<br>
content is:<%= request("title") %>
</form>应该就可以了!访问ASP的地址为
yourasp.asp?title=Hello%20World混合语言我最拿手了 hoho!request("title") 相当于 request.Form("title")
<body>
hello world!!
<form name="form1" method="post" action="test.asp">
<input name="title" type="text" id="title">
<input type="submit" name="Submit" value="提交">
<br>
content is:<%= request.querystring("title") %>
</form>访问ASP文件的地址不变,
因为像这种参数的传递应该被认为是GET方式的,
如还是没有示,那应该是Delphi那段程序有问题吧!
还有,你得IIS启动了没有?
可是怎么试都不行啊,各位高手,能不能再帮帮我,给我一个完整的代码!在这里先跪谢了,这个是我公司实习要的东西,要不再赶不出来,就要被抄了啊。