目的,把远程服务器传回的Html,解析到类里面,为GridView等提供数据源
1 、向远程服务器Post数据
public int PostData(string url, string data, out string info)
{
info = "";
CookieContainer cc = new CookieContainer();
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.CookieContainer = cc;
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
Stream requestStream = request.GetRequestStr...[ 查看全文 ]