- 博客(7)
- 收藏
- 关注
原创 创建自定义 HTTP 模块类
public class HelloWorldModule : IHttpModule{ public HelloWorldModule() { } public String ModuleName { get { return "HelloWorldModule"; } } // In the Init function, regist
2010-01-18 15:46:00 228
原创 JS的正则表达式
//校验是否全由数字组成 [code] function isDigit(s) { var patrn=/^[0-9]{1,20}$/; if (!patrn.exec(s)) return false return true } [/code] //校验登录名:只能输入5-20个以字母开头、可带数字、“_”、“.”的字串 [code] function isRegisterUse
2008-06-18 09:39:00 239
原创 .net验证图片做法
private void ShowImg(string colorf,string colorb) { //colorf=FF0000&colorb=EFF3FF Random ran = new Random(); int intRandom = ran.Next(10001, 99999);
2008-06-17 17:00:00 268
原创 中国身份证号码验证,支持15,18位
/// /// 验证身份证号码 /// /// 身份证号码 /// 验证成功为True,否则为False public static bool CheckIDCard(string Id) { if (Id.Length == 18) {
2008-06-17 16:32:00 416
转载 C#实现所有经典排序算法
class SelectionSorter { private int min; public void Sort(int[] arr) { for (int i = 0; i < arr.Length - 1; ++i) {
2008-06-17 16:01:00 275
转载 C# 中随机生成字母
protected void Button1_Click(object sender, EventArgs e) { Response.Write(GenerateRandom(6).ToLower().ToString()); } private static char[] constant = { a, b, c,
2008-06-17 15:50:00 1014
转载 ASP.NET 2.0防止同一用户同时登陆
放在登陆成功的地方: string key = TextBox1.Text; //用户名文本框设为cache关键字 string uer = Convert.ToString(Cache[key]); //读取cache中用户相应的值 //判断cache中是否有用户的信息,如果没有相关的值,说明用户未登陆 if (uer == null || uer == Strin
2008-06-17 15:28:00 175
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人