木子冬
程序就是规范流程下的替代品,互联网就是对应需求下的一个产业链!

导航

 

原因是因为自己的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" id="img" name="img" xml:lang />
                    <select name="ImgSource" id="ImgSource">
                        @if (imglist != null || imglist.ToList().Count > 0)
                        {
                            foreach (var item in imglist)
                            {                                                               
                            <option value="@item.ImgSource">@item.TypeName </option>
                            }
                        }
                    </select>
                    <input type="button" value="开始上传" id="upload" name="upload" onclick="UpLoad()" xml:lang />
                </td>
            </tr>
        </table>
    }

posted on 2012-05-29 14:42  木子_冬  阅读(846)  评论(0编辑  收藏  举报