string m_QuestURL = "http://localhosts/service.ashx";
//Post请求地址
HttpWebRequest m_Request = (HttpWebRequest)WebRequest.Create(m_QuestURL);
//相应请求的参数
byte[] data = Encoding.GetEncoding("gb2312").GetBytes(m_Doc.OuterXml);
m_Request.Method = "Post";
m_Request.ContentType = "application/x-www-form-urlencoded";
m_Request.ContentLength = data.Length;
//请求流
Stream requestStream = m_Request.GetRequestStream();
requestStream.Write(data, 0, data.Length);
requestStream.Close();
//响应流
HttpWebResponse m_Response = (HttpWebResponse)m_Request.GetResponse();
Stream responseStream = m_Response.GetResponseStream();
StreamReader streamReader = new StreamReader(responseStream, Encoding.GetEncoding("gb2312"));
//获取返回的信息
string result = streamReader.ReadToEnd();
streamReader.Close();
responseStream.Close();