public ActionResult Details(string siteName, string fullName, string returnUrl) { string file = _baseDir.Cms_DataPhysicalPath + fullName; if (System.IO.File.Exists(file)) { using (var sr = new StreamReader(file, Encoding.Default)) { var model = new WebEventDetailsModel { FileInfo = new FileInfo(file), Body = sr.ReadToEnd() }; return View(model); } } return Redirect(returnUrl); }
public ActionResult Details(string siteName, string fullName, string returnUrl) { string file = _baseDir.Cms_DataPhysicalPath + fullName; if (System.IO.File.Exists(file)) { using (var sr = new StreamReader(file, Encoding.Default)) { var model = new WebEventDetailsModel { FileInfo = new FileInfo(file), Body = sr.ReadToEnd() }; return(View(model)); } } return(Redirect(returnUrl)); }