From 76999b805dbcdc407f9eedb585990f7908679c7a Mon Sep 17 00:00:00 2001 From: hbybyyang <2451759073@qq.com> Date: Wed, 11 Oct 2023 18:52:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FIT5032-Assignment/Views/Home/ImageUpload.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FIT5032-Assignment/Views/Home/ImageUpload.cshtml b/FIT5032-Assignment/Views/Home/ImageUpload.cshtml index 8ba25d1..cb4928e 100644 --- a/FIT5032-Assignment/Views/Home/ImageUpload.cshtml +++ b/FIT5032-Assignment/Views/Home/ImageUpload.cshtml @@ -4,7 +4,7 @@ } -@using (Html.BeginForm()) +@using (Html.BeginForm("ImageUpload", "HomeController", FormMethod.Post, new { enctype = "multipart/form-data" })) { @Html.AntiForgeryToken() @@ -23,7 +23,7 @@
@Html.LabelFor(model => model.imageFile, htmlAttributes: new { @class = "control-label col-md-2" })
- @Html.EditorFor(model => model.imageFile, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.imageFile, "", new { @class = "text-danger" })