BookManager.Web.Controllers.AdminController.ChangeBanner C# (CSharp) Метод

ChangeBanner() приватный Метод

private ChangeBanner ( System.Web.HttpPostedFileBase ImagePath ) : System.Web.Mvc.ActionResult
ImagePath System.Web.HttpPostedFileBase
Результат System.Web.Mvc.ActionResult
        public ActionResult ChangeBanner(HttpPostedFileBase ImagePath)
        {
            if (ImagePath != null && ImagePath.ContentLength > 0)
            {
                var pic = "logo" + ".png";
                var path = System.IO.Path.Combine(
                                       Server.MapPath("~/Content/Images"), pic);
                ImagePath.SaveAs(path);
            }
            return RedirectToAction("Index");
        }

Same methods

AdminController::ChangeBanner ( ) : System.Web.Mvc.ActionResult