void UpdateContactSign()
{
string ServerPage ="http://localhost/WebService/MyService.asmx";
try
{
//ServerPage += "?op=TangramAction";
ServerPage += "/MyAction";//MyAction是WebService中的方法
string strXml="<a ObjID=\"9\"></a>",;//第一个参数
&n
C#发送HttpPost请求来调用WebService的方法
这篇博客介绍了如何在C#中通过HttpPost方法调用WebService。主要代码展示了如何构造请求参数,创建HttpWebRequest对象,设置请求头并发送POST请求,最后接收并处理响应数据。

订阅专栏 解锁全文
473

被折叠的 条评论
为什么被折叠?



