How can I get uploaded file full path in C# 3.0?

前端 未结 3 1722
名媛妹妹
名媛妹妹 2020-12-22 07:56

In my ASP.NET MVC website, I have to read a txt file with some names and emails separeted by \';\'. After that, I have to save each line of this txt file to database.

<
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-22 08:11

    var hpf = Request.Files[file] as HttpPostedFile; 
    

    the form in the HTML should have enctype="mulitipart/form-data"

提交回复
热议问题