In a tutorial, you see a Razor form with the attribute asp-controller="Home". What does this attribute indicate?

  • The name of the submit button
  • The HTML form method
  • The name of the controller handling the form
  • The CSS class of the form
The asp-controller attribute in a Razor form indicates the name of the controller that will handle the form submission. This attribute is part of the Razor Pages and MVC conventions in ASP.NET Core, helping to route the form data to the appropriate controller action.
Add your answer
Loading...

Leave a comment

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