摘要: 周末写 阅读全文
posted @ 2013-10-31 22:08 dennys 阅读(358) 评论(0) 推荐(0) 编辑
摘要: private void button5_Click(object sender, EventArgs e) { string html = ""; WebHeaderCollection header = new WebHeaderCollection(); header.Set("Pragma", "no-cache"); html = getHtml("http://www.biomart.cn/info/infoDemand.htm?pge=1", header); Regex regex = new .. 阅读全文
posted @ 2013-10-31 21:45 dennys 阅读(965) 评论(0) 推荐(0) 编辑
摘要: 搜索网络,发现C#通常有三种方法获取网页内容,使用WebClient、WebBrowser或者HttpWebRequest/HttpWebResponse。。。方法一:使用WebClient (引用自:http://fbljava.blog.163.com/blog/static/265211742008712105145244/)static void Main(string[] args){ try { WebClient MyWebClient = new WebClient(); MyWebClient.Credentials = Creden... 阅读全文
posted @ 2013-10-31 21:40 dennys 阅读(1471) 评论(0) 推荐(0) 编辑