Example #1
0
 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);
 }
Example #2
0
        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));
        }