コード例 #1
0
        public ActionResult Index(string file)
        {
            string contents = this.GetContents(file);

            if (string.IsNullOrWhiteSpace(contents))
            {
                throw new FileNotFoundException();
            }

            var model = new Template { Contents = contents, Title = file + ".html" };
            return this.FrapidView(this.GetRazorView<AreaRegistration>("EmailTemplate/Index.cshtml"), model);
        }
コード例 #2
0
 public ActionResult Save(Template model)
 {
     this.SetContents(model.Title, model.Contents);
     return Json("OK");
 }