12 2015 档案

摘要:本文导读:在.NET运用中经常用到缓存(Cache)对象。有HttpContext.Current.Cache以及HttpRuntime.Cache,HttpRuntime.Cache是应用程序级别的,而HttpContext.Current.Cache是针对当前WEB上下文定义的。HttpRunt... 阅读全文
posted @ 2015-12-21 10:09 黄者之风 阅读(1473) 评论(0) 推荐(0)
摘要:http://localhost:37977/UrlWrite.ashx?id=9URL重写成下面的访问方式,有利于SEO搜索引擎http://localhost:37977/UrlWrite-8.ashx实现方法(用正则表达式匹配获取当前请求的虚拟路径):/// /// 当一个请求过来的时候会被调... 阅读全文
posted @ 2015-12-20 16:17 黄者之风 阅读(243) 评论(0) 推荐(0)
摘要:添加Global文件,名字不要改Global类说明:using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Web;using System.Web.Security;u... 阅读全文
posted @ 2015-12-20 13:21 黄者之风 阅读(737) 评论(0) 推荐(0)
摘要:Jquery表单序列化1.必须放在form标签内;2.控件必须有name属性;3.控件的value值会提交到服务器;如: $(function () { $("#btnOK").click(function () { var ... 阅读全文
posted @ 2015-12-20 11:50 黄者之风 阅读(361) 评论(0) 推荐(0)
摘要:1.创建一个空数组:第一种方法:var str = new Array();第二种方法:var str = [];为数组赋值:str[0] = 111;str[1] = 222;2.创建一个有内容的数组:var str = ["aa", "bb", "cc"];遍历数组:for (var i = 0... 阅读全文
posted @ 2015-12-19 15:33 黄者之风 阅读(140) 评论(0) 推荐(0)
摘要:单例类:public class Singleton{ private static Singleton _instance;//定义一个私有Singleton类型字段,此处不实例化 //将构造函数设为private,防止通过new实例化对象 private Singleton()... 阅读全文
posted @ 2015-12-08 16:38 黄者之风 阅读(136) 评论(0) 推荐(0)