1
如何在Razor中编写“ Html.BeginForm”
如果我这样写: 表单action =“ Images” method =“ post” enctype =“ multipart / form-data” 有用。 但是在带有“ @”的Razor中,它不起作用。我有没有犯错? @using (Html.BeginForm("Upload", "Upload", FormMethod.Post, new { enctype = "multipart/form-data" })) { @Html.ValidationSummary(true) <fieldset> Select a file <input type="file" name="file" /> <input type="submit" value="Upload" /> </fieldset> } 我的控制器如下所示: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Upload() { foreach (string file …
133
forms
asp.net-mvc-3
razor