You're given the task to create a form in a Razor view that posts data to an MVC action named "Create" in the "Products" controller. Which built-in Tag Helper can help you generate the form's action attribute correctly?

  • asp-controller
  • asp-area
  • asp-route
  • asp-for
To generate the form's action attribute correctly, you can use the built-in Tag Helper "asp-controller" to specify the controller name, which in this case would be "Products." This helps ensure that the form posts data to the correct MVC action.
Add your answer
Loading...

Leave a comment

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