Wednesday, April 22, 2015

form inline

 <div class="form-group">
            <div class="form-inline">
                @Html.LabelFor(model => model.attendDate, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.attendDate, new { htmlAttributes = new { @class = "form-control" } })
                    @Html.ValidationMessageFor(model => model.attendDate, "", new { @class = "text-danger" })
                </div>
                @Html.LabelFor(model => model.breakfast, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="checkbox">
                    @Html.EditorFor(model => model.breakfast)
                    @Html.ValidationMessageFor(model => model.breakfast, "", new { @class = "text-danger" })
                </div>
                @Html.LabelFor(model => model.lunch, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="checkbox">
                    @Html.EditorFor(model => model.lunch)
                    @Html.ValidationMessageFor(model => model.lunch, "", new { @class = "text-danger" })
                </div>
                @Html.LabelFor(model => model.dinner, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="checkbox">
                    @Html.EditorFor(model => model.dinner)
                    @Html.ValidationMessageFor(model => model.dinner, "", new { @class = "text-danger" })
                </div>
            </div>

No comments:

Post a Comment