从数据库或者资源问价加载模版页面的例子 未测试,出自http://blog.falafel.com/how-to-load-views-from-assembly-in-mvc/
nnhy authored at 2015-05-07 21:33:10
676.00 B
X_NET20
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Caching;

namespace NewLife.Cube.Precompiled
{
    /// <summary>视图缓存依赖</summary>
    public class ViewCacheDependency : CacheDependency
    {
        /// <summary>实例化缓存依赖</summary>
        /// <param name="virtualPath"></param>
        public ViewCacheDependency(string virtualPath)
        {
            base.SetUtcLastModified(DateTime.UtcNow);
        }

        /// <summary>验证</summary>
        public void Invalidate()
        {
            base.NotifyDependencyChanged(this, EventArgs.Empty);
        }
    }
}