我有一个表格水平的控件,应用了“表单控件”类。这是由Mvc脚手架制作的。
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.Data, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Data, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Data, "", new { @class = "text-danger" })
</div>
</div>
有时我想内联两个字段,但我找不到方法。 我看到Bootstrap制作了所有内联或所有水平形式,但不是它们的混合。 我的目标不是触摸(如果可能的话)脚手架剃刀视图的结构。
| ______ |
| ______ | | ______ |
| ______ |
提前致谢