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.
Loading...
Related Quiz
- In the MVC design pattern, which component is primarily responsible for handling user input and interactions?
- In a scenario where you want to cache an action result for a specified duration, which attribute or method can be combined with an action result to achieve this behavior?
- In which part of an MVC application would you typically find attribute routes?
- ASP.NET Core Web APIs use the ________ format as a standard for transmitting data.
- _________ is the lightweight, cross-platform web server used by default with ASP.NET Core.