当前位置: 代码迷 >> Windows Mobile >> windows phone 怎么用post方式提交图片流
  详细解决方案

windows phone 怎么用post方式提交图片流

热度:7588   发布时间:2013-02-26 00:00:00.0
windows phone 如何用post方式提交图片流
通过post方式提交图片流,服务器端接收图片流的参数是ImageFile
求教!
------解决方案--------------------------------------------------------
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
request.Method = "POST";  
在回调中
byte[] data = encoding.GetBytes(requestBody.ToString());


                HttpWebRequest webRequest = asyncResult.AsyncState as HttpWebRequest;
                Stream streamResult = webRequest.EndGetRequestStream(asyncResult);

                                //得到响应流
                streamResult.Write(data, 0, data.Length);
                streamResult.Flush();
                streamResult.Close();
------解决方案--------------------------------------------------------
interested too..
------解决方案--------------------------------------------------------
该回复于2012-08-27 08:52:36被版主删除
  相关解决方案