C# ASP.NET MVC Forms Creating a Basic Form Using HTML Helpers

Stuck. Need help.

Challenge 3 of 3

Report.cshtml
@{
    ViewBag.Title = "Report an Issue";
}

<h2>@ViewBag.Title</h2>
@using(Html.BeginForm())
{
 <div>
     @Html.Label("Name")
   @Html.TextBox("Name", new{ class = "form-control"})    

    </div>

    <div>
        <label for="Email">Email</label>
        <input type="text" id="Email" name="Email" />
    </div>

    <div>
        <label for="DepartmentId">Department</label>
        <input type="text" id="DepartmentId" name="DepartmentId" />
    </div>

    <div>
        <label for="Severity">Severity</label>
        <input type="text" id="Severity" name="Severity" />
    </div>

    <div>
        <label for="Reproducible">Reproducible</label>
        <input type="text" id="Reproducible" name="Reproducible" />
    </div>

    <div>
        <label for="DescriptionOfProblem">Description of Problem</label>
        <textarea id="DescriptionOfProblem" name="DescriptionOfProblem"></textarea>
    </div>

    <button type="submit">Save</button>

}

2 Answers

Steven Parker
Steven Parker
148,894 Points

The instructions say to "use the first method overload that accepts a single string parameter", but you've used a two-parameter version.

And I see you've included a fancy Bootstrap value as the argument, are you cutting and pasting from material outside of the challenge? That will certainly cause complications like this!

Thanks. And yes I keep detailed notes and sometime work these challenges in my notes for future ref. Which I copy and paste.