作者flytzeng (~翔~)
看板Programming
标题Re: asp.net网页 如何post资料到asp,jsp,php网页上?
时间Tue May 30 07:51:19 2006
※ 引述《[email protected] (Cake,Cake,Cake....)》之铭言:
: ※ 引述《[email protected] (~翔~)》之铭言:
: > 第一次在这里发问,请多指教...
: > asp.net中不像asp,php等需要用form的post mathod传递资料
: > 可是如果我要连其他人的asp,php网页,必需传资料过去,
: > 而这些资料又是要在.cs档里先处理过的
: > 请问这时要如何post资料到其他人的网页上呢?
: > 感谢...
: asp.net 真的不需要靠 post or get or cookie 等传递资料?...
asp.net中的post似乎只能用来传资料给自己网页,变成实现asp.net物件导向的手段...
asp.net网页间传资料可以用session or cookie or get,但是好像没有在用post
我的问题是人家的公司jsp网页已经写好,规定只能用post传资料过去,
asp.net的网页如何跟他连通?
google後找到人家写的方法:
System.Net.WebClient web =new System.Net.WebClient();
web.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
byte[] d = new byte[100] ;
d=System.Text.Encoding.ASCII.GetBytes("SEARCHSTRING=test1");
byte[] res = new byte [100];
res = web.UploadData("
http://xxx.com.tw/xxx.jsp", "POST", d);
Label1.Text = System.Text.Encoding.ASCII.GetString(res);
可是我要连的网页因为有ssl加密,用这方法会出现"certificate is invalid "
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.241.201