通过如下的POST方法,如何得到Web服务器返回的数据?

nakey2008 2005-02-02 11:47:07
<form id="Form1" method="post" action="http://localhost/WebService1/Service1.asmx/GetData">
<p>请输入下面的参数:</p>
<p><input type=text name=PropertyName size=20></p>
<p><input type=text name=PropertyValue size=20></p>
<input type=submit value=submit>
<input type=reset value=reset>
</form>

问:这样方法,如何得到返回的数据?
...全文
103 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
nakey2008 2005-02-02
  • 打赏
  • 举报
回复
楼上的可以说的详细点么?比如用这种方法异步调用WEB服务?
Tomgus 2005-02-02
  • 打赏
  • 举报
回复
HttpWebRequest req=(HttpWebRequest)HttpWebRequest.Create(url);

HttpWebResponse resp=(HttpWebResponse)req.GetResponse();
StreamReader sr=new StreamReader(resp.GetResponseStream(),Encoding.GetEncoding("GB2312"));
state=sr.ReadToEnd();

resp.Close();
sr.Close();

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧