Input Boxs "more" in one view

0

I am creating a view for the creation of gymnastic routines, but it turns out that there is an "over" input box from each dropbox of the exercises and I can not find out why.

this is the html:

    @model FitnessWebApplication.Models.Routine

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()

<div class="form-horizontal">
    <h4>Routine</h4>
    <hr />
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })

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

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

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

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

    <form>
        <table>
            <tr>
                <td align="right">@Html.LabelFor(model => model.ArmExcercise, htmlAttributes: new { @class = "control-label col-md-2" })</td>
                <td align="left"> @Html.DropDownListFor(model => model.ArmExcercise, new SelectList(Enum.GetValues(typeof(Routine.ArmsExcercises))), "Select Excersice 1")<input type="text" /></td>
                <td align="left"> @Html.DropDownListFor(model => model.ArmExcercise, new SelectList(Enum.GetValues(typeof(Routine.ArmsExcercises))), "Select Excersice 2")<input type="text" /></td>
                <td align="left"> @Html.DropDownListFor(model => model.ArmExcercise, new SelectList(Enum.GetValues(typeof(Routine.ArmsExcercises))), "Select Excersice 2")<input type="text" /></td>
            </tr>
            <tr>
                <td align="right">@Html.LabelFor(model => model.PecExcercise, htmlAttributes: new { @class = "control-label col-md-2" })</td>
                <td align="left"> @Html.DropDownListFor(model => model.PecExcercise, new SelectList(Enum.GetValues(typeof(Routine.PecsExcercises))), "Select Excersice 1")<input type="text" /></td>
                <td align="left"> @Html.DropDownListFor(model => model.PecExcercise, new SelectList(Enum.GetValues(typeof(Routine.PecsExcercises))), "Select Excersice 2")<input type="text" /></td>
                <td align="left"> @Html.DropDownListFor(model => model.PecExcercise, new SelectList(Enum.GetValues(typeof(Routine.PecsExcercises))), "Select Excersice 3")<input type="text" /></td>
            </tr>
            <tr>
                <td align="right">@Html.LabelFor(model => model.AbdominalExcercise, htmlAttributes: new { @class = "control-label col-md-2" })</td>
                <td align="left"> @Html.DropDownListFor(model => model.AbdominalExcercise, new SelectList(Enum.GetValues(typeof(Routine.AbdominalsExcercises))), "Select Excersice 1")<input type="text" /></td>
                <td align="left"> @Html.DropDownListFor(model => model.AbdominalExcercise, new SelectList(Enum.GetValues(typeof(Routine.AbdominalsExcercises))), "Select Excersice 2")<input type="text" /></td>
                <td align="left"> @Html.DropDownListFor(model => model.AbdominalExcercise, new SelectList(Enum.GetValues(typeof(Routine.AbdominalsExcercises))), "Select Excersice 3")<input type="text" /></td>
            </tr>
            <tr>
                <td align="right">@Html.LabelFor(model => model.BackExcercise, htmlAttributes: new { @class = "control-label col-md-2" })</td>
                <td align="left"> @Html.DropDownListFor(model => model.BackExcercise, new SelectList(Enum.GetValues(typeof(Routine.BackExcercises))), "Select Excersice 1")<input type="text" /></td>
                <td align="left"> @Html.DropDownListFor(model => model.BackExcercise, new SelectList(Enum.GetValues(typeof(Routine.BackExcercises))), "Select Excersice 2")<input type="text" /></td>
                <td align="left"> @Html.DropDownListFor(model => model.BackExcercise, new SelectList(Enum.GetValues(typeof(Routine.BackExcercises))), "Select Excersice 3")<input type="text" /></td>
            </tr>
            <tr>
                <td align="right">@Html.LabelFor(model => model.LegExcercise, htmlAttributes: new { @class = "control-label col-md-2" })</td>
                <td align="left"> @Html.DropDownListFor(model => model.LegExcercise, new SelectList(Enum.GetValues(typeof(Routine.LegsExcercises))), "Select Excersice 1")<input type="text" /></td>
                <td align="left"> @Html.DropDownListFor(model => model.LegExcercise, new SelectList(Enum.GetValues(typeof(Routine.LegsExcercises))), "Select Excersice 2")<input type="text" /></td>
                <td align="left"> @Html.DropDownListFor(model => model.LegExcercise, new SelectList(Enum.GetValues(typeof(Routine.LegsExcercises))), "Select Excersice 3")<input type="text" /></td>
            </tr>
        </table>
    </form>

    @using FitnessWebApplication.Models

    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="Create" class="btn btn-default" />
        </div>
    </div>
</div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
    
asked by Bryan Romero 17.08.2018 в 20:32
source

1 answer

1

You have defined input text after each dropdown

<td align="left"> @Html.DropDownListFor(model => model.ArmExcercise, new SelectList(Enum.GetValues(typeof(Routine.ArmsExcercises))), "Select Excersice 1")<input type="text" /></td>

You should delete it, in each dropdown.

<td align="left"> @Html.DropDownListFor(model => model.ArmExcercise, new SelectList(Enum.GetValues(typeof(Routine.ArmsExcercises))), "Select Excersice 1")</td>
    
answered by 17.08.2018 / 21:06
source