1.在aqioo.Common.AqiooCache命名空间下
2.xml缓存(文件依赖)
#endregion /// <summary> /// xml缓存 /// </summary> /// <param name="key"></param> /// <param name="xd"></param> /// <param name="fileName"></param> public static void AddXMLCache(string key, object xd, string fileName) { System.Web.Caching.CacheDependency cd = new System.Web.Caching.CacheDependency(fileName); HttpRuntime.Cache.Insert(key, xd, cd); } public static void AddXMLCache(string key, string xd, string fileName) { System.Web.Caching.CacheDependency cd = new System.Web.Caching.CacheDependency(fileName); HttpRuntime.Cache.Insert(key, xd, cd); }
3.Aqioo网页面的所有模板页都在aqioo.Web/Pages/layouts目录下

通过以下方法使用母版(加入Layout属性即可)
[Layout("ArticleMaster")] public void Index() { // 决定头部文件 PropertyBag.Add("HeadSign", "article-1"); string title = "", keywords = "", description = ""; DealSeo.SetSeoValue("zixun", PropertyBag, title, keywords, description); string path = HttpContext.Current.Server.MapPath("/Html") + MGfile.GetFilePath(Utils.GetRemoveUpdateStr(Request.Uri.PathAndQuery), Level.level4); bool iscache = Utils.IsFileExits(path, Level.level4); if (!iscache) { calendarDataSet.calendarDataTable tb = calendarDB.GetDateByNow(); if (tb != null && tb.Rows.Count > 0) { calendarDataSet.calendarRow r = tb.Rows[0] as calendarDataSet.calendarRow; PropertyBag.Add("CalendarRow", r); } PropertyBag.Add("PU", new PageUseMethod()); } string url = Context.Url; url = HttpContext.Request.Url.AbsolutePath; Utils.DealHtmlPageCache(this, System.Reflection.MethodBase.GetCurrentMethod().Name, path, iscache); }
4. aqioo网所有的ViewComponent都aqioo.Controller/Components下,这个相当于webform中的用户控件,还可以传递参数

浙公网安备 33010602011771号