获取互联网附件的流

WebClient wc = new WebClient();
wc.Credentials = CredentialCache.DefaultCredentials;
byte[] btPageData = wc.DownloadData("http://www.baidu.com/img/bd_logo1.png");
string strTargetHtml = Encoding.Default.GetString(btPageData);
wc.Dispose();

 

posted @ 2018-11-12 14:04  张伟大  阅读(164)  评论(0编辑  收藏  举报