【发布时间】:2021-04-22 20:13:42
【问题描述】:
我有一个工作按钮,它内置在我的视图上的表单中,但 UI 看起来不太好,需要一些帮助才能将按钮放置在更靠近上传按钮的位置。下面是我在 View.cshtml 上的逻辑;
@using (Html.BeginForm("Browse", "Week", FormMethod.Post, new { enctype = "multipart/form-data", @id = "upload" }))
{
@Html.ActionLink("Create New", "Create", routeValues: new { }, htmlAttributes: new { @class = "modal-link btn btn-primary" })
<input type="file" id="fileUpload" name="upload" class="btn-primary" required style="display:none;" />
<label for="fileUpload" id="button" class="btn btn-primary">Upload</label>
<input type="submit" name="extract" class="btn-primary" required style="display:none;" />
}
@using (Html.BeginForm("ExportToExcel", "Week", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<div>
<input type="submit" value="Extract" class="btn btn-primary" />
</div>
}
【问题讨论】:
标签: c# html asp.net-mvc razor