file upload1 ASP.NET MVC : 화면상에서 파일 업로드 하기 ASP.NET MVC 에서 화면에서 파일 업로드 기능을 추가 하는 방법입니다. 방법 1. MVC 기능을 이용한 파일 업로드 Upload.cshtml @using (Html.BeginForm("Upload", "Home", FormMethod.Post)) { @Html.AntiForgeryToken() 파일 추가 } HomeController [HttpPost] [ValidateAntiForgeryToken] public ActionResult Upload(FormCollection formCollection) { var fileName = string.Empty; if (Request != null) { HttpPostedFileBase file = Request.Files["uploadFile"]; /.. 2019. 1. 23. 이전 1 다음