//我的想法:
/**************************************** 客户端 ********************************/
sChargeServerURL = "http://192.168.1.2/Server/Incept.aspx?name=test";
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(sChargeServerURL);
httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
//接收来自服务器回应的Char[]数据....../** 客户端的代码已经实现
***********************************************************************************/
/**************************************** 服务器 ********************************
1-接收来自客户端的请求
2-判断传来的数据
3-返回相应的数据 服务器的代码未实现
***********************************************************************************/请教我如何实现服务器上的功能呢?
/**************************************** 客户端 ********************************/
sChargeServerURL = "http://192.168.1.2/Server/Incept.aspx?name=test";
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(sChargeServerURL);
httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
//接收来自服务器回应的Char[]数据....../** 客户端的代码已经实现
***********************************************************************************/
/**************************************** 服务器 ********************************
1-接收来自客户端的请求
2-判断传来的数据
3-返回相应的数据 服务器的代码未实现
***********************************************************************************/请教我如何实现服务器上的功能呢?
客户端:
using MSXML2;sChargeServerURL = "http://192.168.1.2/Server/Incept.aspx?name=test";
MSXML2.XMLHTTP _xmlhttp = new MSXML2.XMLHTTPClass();
_xmlhttp.open("GET",sChargeServerURL ,false,null,null);
_xmlhttp.send("");
if( _xmlhttp.readyState == 4 )
{
//接收到数据
}服务器端:
Response.ContentType="text/xml";
Response.Expires =-1;
Response.Charset = "GB2312";
string str=Request.QueryString["name"].ToString();
...........//从这处理返回值假设为ret
Response.Write("<?xml version=\"1.0\" encoding=\"GB2312\"?>"+"<result>"+ret+"</result>";
就没有html代码了