Without that enctypeattribute, the browser will transmit only the name of the file—not its
contents—which is no use to us! Force the enctypeattribute to appear by updating Edit.aspx’s
call to Html.BeginForm():
<% using (Html.BeginForm("Edit", "Admin", FormMethod.Post,
new { enctype = "multipart/form-data" })) { %>
阅读(539) | 评论(0) | 转发(0) |