Ejemplo n.º 1
0
        public ActionResult FileUpload(HttpPostedFileBase file)
        {
            if (file != null)
            {
                LFCContext db           = new LFCContext();
                string     ImageName    = System.IO.Path.GetFileName(file.FileName);
                string     physicalPath = Server.MapPath("~/Images/" + ImageName);

                // save image in folder
                file.SaveAs(physicalPath);
            }
            //Display records
            return(RedirectToAction("../Honour/Index/"));
        }