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

Stewart Mandla Kohlisa
Stewart Mandla Kohlisa
11,128 Points

UM STRUCK HERE PLIZ HELP

NEED HELP WITH THIS CODE

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

<h2>@ViewBag.Title</h2>
@using (Html.BeginForm)
{

<div>
        <label for="Name">Name</label>
        <input type="text" id="Name" name="Name" />
    </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>

}

1 Answer

Steven Parker
Steven Parker
203,717 Points

When you invoke or "call" a method, you must always include parentheses "()" after the method name, even if it does not take any arguments.