Пример #1
0
 public ContentResult Css()
 {
     Response.AppendHeader("Cache-Control", "max-age=1200,stale-while-revalidate=3600"); // HTTP 1.1.
     Response.AppendHeader("Pragma", "no-cache");                                        // HTTP 1.0.
     Response.AppendHeader("Cache-Control", "public");
     Response.AppendHeader("Content-Type", "text/css");
     WebService.AnperoService service = new WebService.AnperoService();
     return(Content(service.GetWebContent(StoreID, TokenKey, 7), "text/css"));
 }
Пример #2
0
 public string PolicyAjax(int type)
 {
     try
     {
         WebService.AnperoService service = new WebService.AnperoService();
         return(service.GetWebContent(StoreID, TokenKey, type));
     }
     catch (Exception)
     {
         return("Nội dung đang được cập nhật");
     }
 }
Пример #3
0
 public ActionResult Policy(int type)
 {
     try
     {
         WebService.AnperoService service = new WebService.AnperoService();
         ViewBag.HtmlContent = service.GetWebContent(StoreID, TokenKey, type);
         ViewBag.Title       = Anpero.Constant.WebContentTitle.GetTitle(type);
     }
     catch (Exception)
     {
         ViewBag.HtmlContent = "Nội dung đang được cập nhật";
     }
     return(View());
 }