首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2010年5月20日

摘要: ASP.NET验证码(非常好用)using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Drawing;using System.Drawing.Drawing2D;using System.IO;using System.Drawing.Imaging;namespace Dachie{ public partial class _Default : System.Web.UI.Page ... 阅读全文

posted @ 2010-05-20 14:27 达奇 阅读(430) 评论(1) 推荐(2) 编辑

摘要: C#测试代码效率的方法using System;using System.Threading;class Dachie{ [System.Runtime.InteropServices.DllImport("Kernel32.dll")] static extern bool QueryPerformanceCounter(ref long count); [System.Runtime.InteropServices.DllImport("Kernel32.dll")] static extern bool QueryPerformanceFreque 阅读全文

posted @ 2010-05-20 13:55 达奇 阅读(425) 评论(0) 推荐(1) 编辑

摘要: C#复制整个目录using System;using System.Collections.Generic;using System.Text;using System.IO;namespace Dachie{ class Program { static void Main(string[] args) { DirectoryCopy(@"C:\Users\Administrator\Desktop\EditGridviewCells", @"C:\Users\Administrator\Desktop\新建文件夹", true)... 阅读全文

posted @ 2010-05-20 13:10 达奇 阅读(661) 评论(0) 推荐(2) 编辑

摘要: 这三个对象我们在开发Asp.net程序时经常会用到,似乎很熟悉,但有时候又不太确定。本文通过一个简单的例子来直观的比较一下这三个对象的使用。HttpModule:Http模块,可以在页面处理前后、应用程序初始化、出错等时候加入自己的事件处理程序HttpHandler:Http处理程序,处理页面请求HttpHandlerFactory:用来创建Http处理程序,创建的同时可以附加自己的事件处理程序例子很简单,就是在每个页面的头部加入一个版权声明。一、HttpModule这个对象我们经常用来进行统一的权限判断、日志等处理。例子代码: public class MyModule : IHttpMod 阅读全文

posted @ 2010-05-20 12:49 达奇 阅读(283) 评论(0) 推荐(2) 编辑

摘要: datagridview某列格式化成两位小数.............................................................................................................................................................datagridView.columns[i]/defaultCellStyle.Format='f";------------------------------------------------------------ 阅读全文

posted @ 2010-05-20 12:42 达奇 阅读(1809) 评论(0) 推荐(1) 编辑