Razor列定义

Razor列定义,razor,Razor,我的razor代码,创建此布局 但是我不喜欢这个位置。我想要这样的东西 我怎样才能创建像上面的图片一样的东西 这是我的剃须刀代码 <div class="form-group"> @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" }) <div class="col-md-4"

我的razor代码,创建此布局

但是我不喜欢这个位置。我想要这样的东西

我怎样才能创建像上面的图片一样的东西

这是我的剃须刀代码

     <div class="form-group">

                    @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })
                    <div class="col-md-4">
                        @using (DAEF.DA_Mit daef = new DAEF.DA_Mit())
                        {
                            @Html.DropDownListFor(
                          model => model.CodMit,
                          new SelectList(daef.SelectAll(), "CodMit", "ItemPerDropdown"), new { @class = "form-control" })
                        }
                        @Html.ValidationMessageFor(model => model.CodMit, "", new { @class = "text-danger" })
                    </div>


                    @Html.LabelFor(model => model.CodCreator, new { @class = "control-label col-md-2" })
                    <div class="col-md-4">
                        @using (DAEF.DA_Mit daef = new DAEF.DA_Mit())
                        {
                            @Html.DropDownListFor(
                            model => model.CodCreator,
                            new SelectList(daef.SelectAll(), "CodMit", "ItemPerDropdown"), new { @class = "form-control" })
                        }
                        @Html.ValidationMessageFor(model => model.CodMit, "", new { @class = "text-danger" })
                    </div>

                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.Info, new { @class = "control-label col-sm-2" })
                    <div class="col-sm-4">
                        @Html.TextAreaFor(model => model.Info, new { @class = "form-control", rows = 4 })
                        @Html.ValidationMessageFor(model => model.Info, "", new { @class = "text-danger" })
                    </div>
                </div>

            </div>

@LabelFor(model=>model.Name,新的{@class=“controllabel col-md-2”})
@使用(DAEF.DA_Mit DAEF=new DAEF.DA_Mit())
{
@Html.DropDownListFor(
model=>model.CodMit,
新的选择列表(daef.SelectAll(),“CodMit”,“ItemPerDropdown”),新的{@class=“formcontrol”})
}
@Html.ValidationMessageFor(model=>model.CodMit,“,new{@class=“text danger”})
@LabelFor(model=>model.CodCreator,新的{@class=“controllabel col-md-2”})
@使用(DAEF.DA_Mit DAEF=new DAEF.DA_Mit())
{
@Html.DropDownListFor(
model=>model.CodCreator,
新的选择列表(daef.SelectAll(),“CodMit”,“ItemPerDropdown”),新的{@class=“formcontrol”})
}
@Html.ValidationMessageFor(model=>model.CodMit,“,new{@class=“text danger”})
@LabelFor(model=>model.Info,新的{@class=“controllabel col-sm-2”})
@Html.TextAreaFor(model=>model.Info,new{@class=“form control”,rows=4})
@Html.ValidationMessageFor(model=>model.Info,“,new{@class=“text danger”})
有人能帮我吗?

最后一位

<div class="col-sm-4">

一定是

<div class="col-sm-12">

另外两个呢

<div class="col-md-4">

一定是

<div class="col-md-6">

也可以用两个独立的组代替两个嵌套的组

有关所用网格系统的更多信息: