File Upload ASP.NET MVC 3.0

后端 未结 21 1000
无人共我
无人共我 2020-11-22 01:09

(Preface: this question is about ASP.NET MVC 3.0 which was released in 2011, it is not about ASP.NET Core 3.0 which was released in 2019)

I want to

21条回答
  •  情歌与酒
    2020-11-22 01:49

    I have faced this same error while i am doing file uploading concept. I know lot of answer provided by developers for this question.

    Even though why i am answering to this question is, have got this error by the below mentioned inattentive mistake.

    
    

    While giving name attribute make sure that your controller parameter are also having the same name value "uploadedFile". Like this :

       [HttpPost]
                public ActionResult FileUpload(HttpPostedFileBase uploadedFile)
                {
    
                }
    

    otherwise it won't get mapped.

提交回复
热议问题