摘要:
周末写 阅读全文
摘要:
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 .. 阅读全文
摘要:
搜索网络,发现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... 阅读全文