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

Task 1 In Report.cshtml add a model directive to strongly type the view using the IssueReporter.Models.Is

I lower the case of Model to model and still the bummer Did you remove any of the provided code? The challenge does not ask for any code to be removed. What an I missing here.

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

<h2>@ViewBag.Title</h2>

@using (Html.BeginForm())
{
    <div>
        @Html.Label("Name")
        @Html.TextBox("Name")
    </div>

    <div>
        @Html.Label("Email")
        @Html.TextBox("Email")
    </div>

    <div>
        @Html.Label("DepartmentId")
        @Html.TextBox("DepartmentId")
    </div>

    <div>
        @Html.Label("Severity")
        @Html.TextBox("Severity")
    </div>

    <div>
        @Html.Label("Reproducible")
        @Html.TextBox("Reproducible")
    </div>

    <div>
        @Html.Label("DescriptionOfProblem")
        @Html.TextArea("DescriptionOfProblem")
    </div>

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

1 Answer

Steven Parker
Steven Parker
204,855 Points

It looks like you removed the "@" symbol in front of the brace.

On what was the top line (now line 2), there was an "@" symbol in front of the brace to indicate the start of a C# code block. Your new top line looks good, but the rest of the provided code needs to remain as it was.