public ActionResult AddImage([Bind()] Image image) { string filename = Path.GetFileNameWithoutExtension(image.ImageFile.FileName); string extention = Path.GetExtension(image.ImageFile.FileName); filename = filename + DateTime.Now.ToString("yymmssfff") + extention; image.ImagePath = "~/Images/" + filename; filename = Path.Combine(Server.MapPath("~/Images/"), filename); image.ImageFile.SaveAs(filename); image = ILogic.AddImage(image); Session["Image"] = image; ModelState.Clear(); return(View(image)); }