时时更新的技巧

1.     public static object Substitute(this HtmlHelper html, MvcCacheCallback cb)
        {
            html.ViewContext.HttpContext.Response.WriteSubstitution(c => cb(new HttpContextWrapper(c)));
            return null;
        }

在mvc中可以写出缓存。用在webform也可以。但方法有所变,可以参考微软的msdn(关键字WriteSubstitution)

posted on 2010-05-17 15:27  jianshaohui  阅读(192)  评论(0编辑  收藏  举报

导航