С bootstrap4
вы можете достичь этого, используя form-row
или просто обычный row
класс css.
<form>
<!-- you can use "row" class here -->
<div class="form-row">
<div class="col">
@Html.TextBoxFor(x => x.City, new { @class = "form-control" })
@Html.ValidationMessageFor(x => x.City)
@Html.Labelfor(x => x.City, new { @class = "text-muted small" })
</div>
<div class="col">
@Html.DropDownListFor(x => x.State,
PressRoom.Helpers.StateNamesList.GetStatesList(),
"-- Select a state --",
new { @class = "form-control" })
@Html.ValidationMessageFor(x => x.State)
@Html.Labelfor(x => x.State, new { @class = "text-muted small" })
</div>
<div class="col">
@Html.TextBoxFor(x => x.ZipCode, new { @class = "form-control" })
@Html.ValidationMessageFor(x => x.ZipCode)
@Html.Labelfor(x => x.ZipCode, new { @class = "text-muted small" })
</div>
</div>
</form>
И это будет выглядеть так:
![enter image description here](https://i.stack.imgur.com/uFG2P.png)