【发布时间】:2015-05-13 08:36:45
【问题描述】:
我的视图中有一个类似的表单,但是如何在我的表单中进行选择,因为我找不到任何SelectFor。
这个表单在一个模态对话框中,即正文。所以它是按钮,但我在模式页脚中有“取消”和“确定”按钮。那么如何从这个表单中删除提交按钮,并将其放在模态框的页脚中?
谢谢
@using (Html.BeginForm("LeggTilUtdannelse", "Utdannelse", FormMethod.Post, new { @class = "form-horizontal" }))
{
@Html.AntiForgeryToken()
<div class="form-group">
@Html.LabelFor(m => m.Studiested, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.TextBoxFor(m => m.Studiested, new { @class = "form-control", autocomplete = "off" })
</div>
@Html.ValidationMessageFor(m => m.Studiested)
</div>
<div class="form-group">
@Html.LabelFor(m => m.Beskrivelse, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.TextBoxFor(m => m.Beskrivelse, new { @class = "form-control", autocomplete = "off" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.Fra, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.TextBoxFor(m => m.Fra, new { @class = "form-control", autocomplete = "off" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.Til, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.TextBoxFor(m => m.Til, new { @class = "form-control", autocomplete = "off" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" class="btn btn-default" value="Legg til" />
</div>
</div>
【问题讨论】:
标签: asp.net-mvc razor