Which Razor helper is primarily used to generate form elements in an ASP.NET Core view?

  • @Html.Form
  • @Html.TextBox
  • @Html.ActionLink
  • @Html.BeginForm
The correct option is @Html.BeginForm. This Razor helper is used to generate the opening

element in an ASP.NET Core view when you want to create a form for user input. It sets the action and method attributes of the form, allowing you to specify where the form data should be submitted and how it should be sent (GET or POST).
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *