http://stackoverflow.com/questions/17990310/how-to-align-inline-radios-checkboxes-and-help-block-elements-in-horizontal-fo
@model RegMSW.Web.Models.flightInfo
@using (Html.BeginForm())
{
<div class="form-horizontal">
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.pickup, htmlAttributes: new { @style = "width: 200px", @class = "control-label col-md-2" })
<div class="col-md-8">
<div id="flightInfoTemplate" >
<label class="radio-inline">
@Html.RadioButtonFor(model => model.pickup, "pickup") pickup
</label>
<label class="radio-inline">
@Html.RadioButtonFor(model => model.pickup, "dropoff") dropoff
</label>
<label class="radio-inline">
@Html.RadioButtonFor(model => model.pickup, "none", new { @checked = "checked" }) none
</label>
@Html.ValidationMessageFor(model => model.pickup, "", new { @class = "text-danger" })
</div>
@model RegMSW.Web.Models.flightInfo
@using (Html.BeginForm())
{
<div class="form-horizontal">
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.pickup, htmlAttributes: new { @style = "width: 200px", @class = "control-label col-md-2" })
<div class="col-md-8">
<div id="flightInfoTemplate" >
<label class="radio-inline">
@Html.RadioButtonFor(model => model.pickup, "pickup") pickup
</label>
<label class="radio-inline">
@Html.RadioButtonFor(model => model.pickup, "dropoff") dropoff
</label>
<label class="radio-inline">
@Html.RadioButtonFor(model => model.pickup, "none", new { @checked = "checked" }) none
</label>
@Html.ValidationMessageFor(model => model.pickup, "", new { @class = "text-danger" })
</div>
No comments:
Post a Comment