码迷,mamicode.com
首页 >  
搜索关键字:webclient commons-pool    ( 503个结果
Json数据处理方法
protected string GetJson(string url) { WebClient wc = new WebClient(); wc.Credentials = CredentialCache.DefaultCredentials; wc...
分类:Web程序   时间:2015-08-04 15:14:50    阅读次数:143
C#中WebClient中文乱码的解决办法
原文: C#中WebClient中文乱码的解决办法 第一次尝试: string question = textBox1.Text.ToString(); WebClient youdao = new WebClient(); youdao.Encoding = System.Text.Encodin...
分类:Windows程序   时间:2015-08-03 06:27:13    阅读次数:657
C#用WebClient下载File时操作超时的问题
这个是原代码:System.Net.WebClientwc =newSystem.Net.WebClient();wc.OpenRead("http://patrickkroft.com/mp3/Pearl.mp3");Int64bytes_total=Convert.ToInt64(wc.Resp...
分类:Windows程序   时间:2015-07-21 01:14:50    阅读次数:630
winform自动更新并实现文件的批量异步下载
public partial class update : Form { private WebClient client; int downfilenum = 0; //已下载文件数 int downlistnum = 0;//总下载文件数 List list; private string UR...
分类:Windows程序   时间:2015-07-21 01:14:25    阅读次数:243
WebClient异步下载文件
private WebClient MyWebClient = new WebClient(); private void MyWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEve...
分类:Web程序   时间:2015-07-21 01:04:23    阅读次数:185
黄聪:C#中WebClient自动判断编码是UTF-8还是GBK,并且有超时判断功能
public class WebDownload : WebClient { private int _timeout; /// /// 超时时间(毫秒) /// public int Timeout { ...
分类:Windows程序   时间:2015-07-16 21:30:24    阅读次数:200
使用commons-pool 构筑简易ConnectionPool
在编程中,池的运用应当是很广泛了,如连接池,线程池,资源池等。实际编程中,我们也可以构建Cache池,也可能有涉及到其它的情况,需要使用pool方案来解决。为此Apache中开发了一个通用的Pool工具:commons-pool,现在这个工具有两个版本(1.X, 2.X)并且有很大的不同。这里说.....
分类:其他好文   时间:2015-07-14 20:09:00    阅读次数:138
c#利用WebClient和WebRequest获取网页源代码的比较
前几天举例分析了用asp+xmlhttp获取网页源代码的方法,但c#中一般是可以利用WebClient类和WebRequest类获取网页源代码。下面分别说明这两种方法的实现。WebClient类获取网页源代码WebClient类 WebClient类位于System.Net命名空间下,WebCli....
分类:Windows程序   时间:2015-07-11 09:00:54    阅读次数:186
webclient下载文件 带进度条
private void button1_Click(object sender, EventArgs e) { doDownload(textBox1.Text.Trim()); } private DateTime St...
分类:Web程序   时间:2015-07-06 19:38:00    阅读次数:114
抓取网页
WebClient we = new WebClient(); //主要使用WebClient类 byte[] myDataBuffer; myDataBuffer = we.DownloadData(textBox1.Text....
分类:Web程序   时间:2015-07-01 09:49:53    阅读次数:262
503条   上一页 1 ... 34 35 36 37 38 ... 51 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!