2015年4月2日

Lambda表达式的演变

摘要: 1.0版本 static bool query(Pig p) //表达式 { //设置一个选择的条件 return p.Age > 800; } List piglist = GetPigList(); ... 阅读全文

posted @ 2015-04-02 09:56 ianism 阅读(200) 评论(0) 推荐(0) 编辑

2015年3月19日

反射小例

摘要: /// /// 接口中首先定义方法名称 /// public interface IPlugs { string Name { get; } string Process(string str); } /// ///... 阅读全文

posted @ 2015-03-19 08:47 ianism 阅读(151) 评论(0) 推荐(0) 编辑

2015年3月16日

进程外Session

摘要: StateServer的进程外Session需要提前在服务中开启ASP.NET State Service服务然后web.config中进行配置 //这是具体配置 SQLServer的进程外Session需要提前在VS开发人员命令行中进行配置aspn... 阅读全文

posted @ 2015-03-16 17:42 ianism 阅读(183) 评论(0) 推荐(0) 编辑

页面缓存的几种方式

摘要: ASPX窗体前台页面配置或者在一般用户自定义web控件(ascx)中进行配置,配置命令如上,然后将ascx文件拖进窗体文件(aspx)中,此控件的缓存会按照配置进行处理。 阅读全文

posted @ 2015-03-16 17:25 ianism 阅读(468) 评论(0) 推荐(0) 编辑

数据缓存的几种方式

摘要: //绝对时间的缓存设置 if (HttpRuntime.Cache["time"] == null) { object obj = DateTime.Now; //设置绝对... 阅读全文

posted @ 2015-03-16 17:20 ianism 阅读(344) 评论(0) 推荐(0) 编辑

2015年3月12日

Session

摘要: //3.1用session保存用户的登录名 Session["UserName"] = name; //3.3跳转回首页 Response.Red... 阅读全文

posted @ 2015-03-12 23:52 ianism 阅读(130) 评论(0) 推荐(0) 编辑

Cookie

摘要: //3.0保存用户的登录信息,并且跳转回首页(用cookie保存) //3.1创建cookie对象,并将要保存的值赋值给cookie HttpCookie cookie = new H... 阅读全文

posted @ 2015-03-12 23:47 ianism 阅读(117) 评论(0) 推荐(0) 编辑

2015年3月10日

AJAX学习

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;namespace Ajax{ /// /// AJAX 的... 阅读全文

posted @ 2015-03-10 21:56 ianism 阅读(140) 评论(0) 推荐(0) 编辑

验证码的实现

摘要: protected string GetVCode(int num) //生成验证码的方法 { char[] cha = new char[] {'1','2','3','a','b','c','e','f' }; ... 阅读全文

posted @ 2015-03-10 21:39 ianism 阅读(171) 评论(0) 推荐(0) 编辑

2015年3月7日

ASP.NET动态显示数据的两种方式

摘要: /// /// 后台代码 /// public partial class ArticleList : System.Web.UI.Page { public System.Text.StringBuilder sb = new System.Text.S... 阅读全文

posted @ 2015-03-07 21:31 ianism 阅读(1269) 评论(0) 推荐(0) 编辑

导航