原因是因为自己的form表单内没有添加

enctype = "multipart/form-data"

 

    @using (Html.BeginForm("UpLoadImg", "FamousStory", FormMethod.Post, new { enctype = "multipart/form-data", name = "upform", id = "upform" }))
    {
        <table align="center" style="width: 700px; text-align: center; border-style: ridge;
            border-width: 3pt">
            <th colspan="3">
                <font color="red" size="25" align="left">单一图片分类上传</font>
            </th>
            <tr>
                <td align="center">
                    <input type="file" >    }

相关文章:

  • 2021-06-30
  • 2021-07-19
  • 2021-12-26
  • 2021-04-01
  • 2021-11-03
猜你喜欢
  • 2022-03-03
  • 2021-05-10
  • 2021-04-22
  • 2021-10-25
  • 2021-07-28
相关资源
相似解决方案