参见英文答案 >
Looking for a Html.SubmitButton helper that would accept class attributes in MVC36个
我正在为索引页面制作一个小表单.
我正在为索引页面制作一个小表单.
@model MarketPlace.Models.Download @{ ViewBag.Title = "Index"; } @using (Html.BeginForm("Index","Downloads",System.Web.Mvc.FormMethod.Post,new { enctype = "multipart/form-data" })) { <td>@Html.DisplayNameFor(model => model.EMail)</td> <td>@Html.TextBoxFor(model => model.EMail,new { @class = "form-control round-input",@style = "width:200px" })</td> <td>@Html.DisplayNameFor(model => model.Reference)</td> <td>@Html.TextBoxFor(model => model.Reference,new {@class = "form-control round-input",@style = "width:200px"})</td> <td>@Html.DisplayNameFor(model => model.Products)</td> <td>@Html.Buttonorsomething }
我以为会有一个`@Html.Button或其他东西,我在Google上搜索,但显然他们没有添加一个.
我的问题是,我该如何制作一个按钮?
编辑:请注意,我一直在使用ASP.NET MVC很短的时间,请原谅我这个愚蠢的问题!