码迷,mamicode.com
首页 >  
搜索关键字:webrequest    ( 197个结果
ASP.NET下载远程图片保存到本地的方法、保存抓取远程图片
ASP.NET下载远程图片保存到本地的方法、保存抓取远程图片2012-05-16 11:25:51 我来说两句 收藏我要投稿以下介绍两种方法:1.利用WebRequest,WebResponse 类WebRequest wreq=WebRequest.Create("http://up.2cto.c...
分类:Web程序   时间:2014-10-29 00:12:15    阅读次数:190
发送复杂的HTTP GET请求并且取回响应。
设计思想: 创建一个HttpWebRequest类的实例,并通过GetReponse()方法取回响应的HTTP响应。实例方案:string url="http://www.baidu.com";HttpWebRequest req=(HttpWebRequest)WebRequest.Cr...
分类:Web程序   时间:2014-10-19 11:23:30    阅读次数:156
网站数据获取
本例中主要是通过HtmlAgilityPack解析html源码获取所需的数据. using HtmlAgilityPack;1.通过C#中WebRequest,WebResponse,StreamReader类获取网页源代码WebRequest request = WebRequest.Create...
分类:Web程序   时间:2014-10-17 18:15:13    阅读次数:186
网站数据获取
本例中主要是通过HtmlAgilityPack解析html源码获取所需的数据. using HtmlAgilityPack;1.通过C#中WebRequest,WebResponse,StreamReader类获取网页源代码WebRequest request = WebRequest.Create...
分类:Web程序   时间:2014-10-17 16:50:24    阅读次数:135
C# 6.0 (C# vNext) 新功能之:Exception-Handling Improvements
在 C# 6.0 新功能裹的异常处理,有两个改进: 异步处理(async and await)可以在 catch block 裹使用了。在 C# 5.0 推出的 async and await,当时不可以用於 catch block,现在已经可以了。支持异常过滤 exception filtering 异步处理的例子: try { WebRequest webRequest = We...
分类:Windows程序   时间:2014-10-14 23:53:19    阅读次数:296
WebRequestManager对象的使用
WebRequestManager可以喝WebRequest对象一起使用。WebRequestManager对象的add_completedRequest方法,可以用来处理所有WebRequest对象的请求程序。Time.aspxGlobalCompleted.aspx Networking ...
分类:Web程序   时间:2014-09-24 17:29:17    阅读次数:184
C# 发送和接受Get请求
1、发送Get请求 public static string HttpGet(string Url, string postDataStr) { HttpWebRequest request = (HttpWebRequest)WebRequest.Cr...
分类:其他好文   时间:2014-09-18 18:40:04    阅读次数:144
Winfrom 抓取web页面内容代码
WebRequest request = WebRequest.Create("http://1.bjapp.sinaapp.com/play.php?a=" + PageUrl); WebResponse response = request.GetR...
分类:Windows程序   时间:2014-09-18 18:30:54    阅读次数:177
HttpWebResponse远程服务器返回错误: (500) 内部服务器错误
现象我们编码实现请求一个页面时,请求的代码类似如下代码:HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strUrl);req.UserAgent = "MSIE6.0";req.Method = "GET";HttpWebRespons...
分类:Web程序   时间:2014-09-05 17:39:31    阅读次数:184
WebRequest 对象的使用
// 待请求的地址string url = "http://www.cnblogs.com"; // 创建 WebRequest 对象,WebRequest 是抽象类,定义了请求的规定,// 可以用于各种请求,例如:Http, Ftp 等等。// HttpWebRequest...
分类:Web程序   时间:2014-09-02 12:00:44    阅读次数:256
197条   上一页 1 ... 15 16 17 18 19 20 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!