夏雷

积极人生,努力加油!

2008年12月4日

marquee

摘要: marquee 目录 功能 参数 注释 示例 功能 创建一个滚动的文本字幕。 参数 direction 表示滚动的方向,值可以是left,right,up,down,默认为left behavior 表示滚动的方式,值可以是scroll(连续滚动)slide(滑动一次)alternate(来回滚动) ... 阅读全文

posted @ 2008-12-04 17:49 夏雷 阅读(246) 评论(0) 推荐(0) 编辑
身份证 验证

摘要: private bool CheckIDCard_CHS(string IDCard) { string[] arrVarifyCode = ("1,0,x,9,8,7,6,5,4,3,2").Split(','); string[] Wi = ("7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2").Split(','); string[] Chec... 阅读全文

posted @ 2008-12-04 10:51 夏雷 阅读(157) 评论(0) 推荐(0) 编辑

2008年12月2日

使用WebClient自动填写并提交ASP.NET页面表单

摘要: 使用WebClient自动填写并提交ASP.NET页面表单 在.NET中通过程序填写和提交表单还是比较简单。比如,要提交一个如下图所示的登录表单: 填写和提交以上表单的代码如下: // 要提交表单的URI字符串。 string uriString = "http://www.xxx.com/Login.aspx"; ... 阅读全文

posted @ 2008-12-02 15:51 夏雷 阅读(266) 评论(0) 推荐(0) 编辑
WebClient 保持 Session 和 Cookie

摘要: 有些朋友说 WebClient 不能保持 Session 和 Cookie,只有 HttpWebRequest 才能保持 Session。实际上我们只要重写 WebClient 的 GetWebRequest 方法就可以使 WebClient 保持 Session 和 Cookie。 下面是 HttpClient 类, 它继承自 WebClient,并重写了 GetWebRequest 方法。关... 阅读全文

posted @ 2008-12-02 15:50 夏雷 阅读(806) 评论(0) 推荐(0) 编辑
WebClient读取网页

摘要: WebClient Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> WebClient client = new WebClient(); Stream stream = client.OpenRead("http://www... 阅读全文

posted @ 2008-12-02 15:49 夏雷 阅读(297) 评论(0) 推荐(0) 编辑
c#图片上传和加水印

摘要: 添加一个FileUpload控件,然后再添加一个image控件 //上传图片 protected void BtnUpload_Click(object sender, EventArgs e) { //上传图片 //取出文件路径 string FileFullName = this.FileUpload1.PostedF... 阅读全文

posted @ 2008-12-02 15:43 夏雷 阅读(755) 评论(0) 推荐(0) 编辑

2008年11月12日

target属性

摘要: target属性 1._blank my document 浏览器会另开一个新窗口显示document.html文档 1.1_black my document 浏览器会另开一个新窗口显示document.html文档,并覆盖以前的窗口进行复制。 2._parent my document 指向父fra... 阅读全文

posted @ 2008-11-12 09:34 夏雷 阅读(1159) 评论(1) 推荐(0) 编辑

2008年10月31日

生成高质量缩略图

摘要: using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.U... 阅读全文

posted @ 2008-10-31 08:46 夏雷 阅读(407) 评论(0) 推荐(0) 编辑
生成缩略图 C#源码

摘要: #region 获取缩略图 /// /// 获取缩略图 /// /// 要做缩略图的图片路径 /// 保存缩略图的路径 /// 是否成功 public static bool makeListImage(string imgPath, string savePaty) ... 阅读全文

posted @ 2008-10-31 08:46 夏雷 阅读(433) 评论(0) 推荐(0) 编辑

2008年10月29日

动态调用WebService

摘要: --> 多数时候我们通过 "添加 Web 引用..." 创建客户端代理类的方式调用WebService,但在某些情况下我们可能需要在程序运行期间动态调用一个未知的服务。在 .NET Framework 的 System.Web.Services.Description 命名空间中有我们需要的东西。 具体步骤: 1. 从目标 URL 下载 WSDL 数据。 2. 使用 ServiceDe... 阅读全文

posted @ 2008-10-29 08:34 夏雷 阅读(657) 评论(3) 推荐(0) 编辑