页面跳转

%> …… 阅读全文

用Socket类构建网页下载器

Microsoft.Net Framework为应用程序访问Internet提供了分层的、可扩展的以及受管辖的网络服务,其名字空间System.Net和System.Net.Sockets包含丰富的类可以开发多种网络应用程序。所谓“分层”,可以视为包含3个层次:请求/响应层、应用协议层、传输层。WebReqeust和WebResponse 代表了请求/响应层,支持Http、Tcp和Udp的类组成 …… 阅读全文

怎样输出图片下载

//Identifythefiletodownloadincludingitspath.stringfilepath=DownloadFileName;//Identifythefilename.stringfilename=System.IO.Path.GetFileName(filepath);Response.Cle …… 阅读全文

C# 获取外网图片并保存到相对应路径

publicstaticintSaveImageFromWeb(stringimgUrl,stringpath,stringfileName)...{if(path.Equals(""))thrownewException("未指定保存文件的路径");stringimgName=imgUrl.ToString().Substring(imgUrl. …… 阅读全文

如何取得網路上的圖片

1privateImageGetImageFromURL(stringstrUrl)2...{3//建立一個WebRequest4HttpWebRequestMyHttpWebRequest=(HttpWebRequest)WebRequest.Create(strUrl);5//由WebRequest取得WebResponse6HttpW …… 阅读全文

Asp.net上传图片并生成缩略图

在ASP.NET中上传图片并生成缩略图的C#源码 using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web …… 阅读全文