#19205: Adding enctype attribute to form to support file uploads.

Work Item: 16507

--HG--
branch : 1.x
This commit is contained in:
Sipke Schoorstra
2013-01-20 01:02:06 +01:00
parent 003ac46030
commit ea44b76241
2 changed files with 2 additions and 2 deletions

View File

@@ -9,7 +9,7 @@
Layout.Title = (string)pageTitle.Text;
}
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", new { ReturnUrl = Request.QueryString["ReturnUrl"] }))) {
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", new { ReturnUrl = Request.QueryString["ReturnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data" })) {
@Html.ValidationSummary()
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
@Display(Model)

View File

@@ -8,7 +8,7 @@
Layout.Title = pageTitle;
}
@using (Html.BeginFormAntiForgeryPost()) {
@using (Html.BeginFormAntiForgeryPost(Url.Action("Edit"), FormMethod.Post, new { enctype = "multipart/form-data" })) {
@Html.ValidationSummary()
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
@Display(Model)