随笔分类 -  asp.net mvc

asp.net mvc
摘要:asp.net mvc 清除视图缓存,消除缓存方法public ActionResult SearchCommunityPopulation(){ //禁止页面被缓存 Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetExpires(DateTime.Today.AddYears(-2)); return PartialView("Index", 数据源);} 阅读全文
posted @ 2013-01-15 14:32 yanggm 阅读(1470) 评论(1) 推荐(0)
摘要:首先说一下,有种情况就是session半个小时后自动失效,会出现跳到登录页面会有画中画的效果,然而可以通过Attribute解决,通常情况下一般都是通过ajax请求,所以呢,下面的方法可以解决 1 public class UserAuthorizeAttribute : AuthorizeAttribute 2 { 3 public override void OnAuthorization(AuthorizationContext filterContext) 4 { 5 // ajax 请求... 阅读全文
posted @ 2012-12-14 13:31 yanggm 阅读(378) 评论(1) 推荐(0)
摘要:前言:百度地图标注物数据加载结合百度API(http://openapi.baidu.com/map/jsdemo.htm) 和百度拾取坐标系统(http://dev.baidu.com/wiki/static/map/API/tool/getPoint/)二者缺一不可,下面就来说说详细的调用和实现方法.(说明:用的是asp.net mvc 3)1.前端页面代码 1 @{ 2 Layout = null; 3 } 4 <!DOCTYPE html> 5 <html> 6 <head> 7 <title>地图展示</title> 8 & 阅读全文
posted @ 2012-12-13 16:21 yanggm 阅读(1734) 评论(3) 推荐(0)