导航

2012年5月14日

摘要: System.Web.Routing.RouteTable.Routes.GetVirtualPath(Request.RequestContext, new System.Web.Routing.RouteValueDictionary(new { action = "Index", id = 999 }));可用此方法在Controller层生成链接地址,避免硬编码带来重复修改 阅读全文

posted @ 2012-05-14 22:21 yjss 阅读(410) 评论(0) 推荐(0) 编辑

摘要: 在Global.asax中加入如下代码 protected void Application_AuthenticateRequest(Object sender, EventArgs e) { if (HttpContext.Current.User != null) { if (HttpContext.Current.User.Identity.IsAuthenticated) { if (HttpContext.Curre... 阅读全文

posted @ 2012-05-14 21:14 yjss 阅读(517) 评论(1) 推荐(0) 编辑