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); }
public ActionResult Save(Template model) { this.SetContents(model.Title, model.Contents); return Json("OK"); }