摘要: 1.创建自定义特性 类继承于Attribute类,并且自定义特性的命名规则于:XXXXAttriubute1 /// 2 /// 跳过登陆 标记:任何类 或者方法 有此标记,则不再验证是否有Session3 /// 4 public class SkipLoginAttribute:Attribute5 {6 }2.给方法或类写上特性 可以写上多个特性,以逗号分开 [HttpGet,MyAttr.SkipLogin] public ActionResult Login() { //Reques... 阅读全文
posted @ 2014-03-25 07:22 bl84757922 阅读(1122) 评论(0) 推荐(0) 编辑
摘要: 1 阅读全文
posted @ 2014-03-25 07:11 bl84757922 阅读(105) 评论(0) 推荐(0) 编辑