Which ASP.NET Core method is used to return a Razor view from a controller action?
- ViewResult
- JsonResult
- ContentResult
- RedirectResult
The ViewResult is used to return a Razor view from a controller action in ASP.NET Core. It allows you to render a view and pass a model to it, which can then be used for dynamic content generation.
Loading...
Related Quiz
- You're implementing an API endpoint that should return a file to the user. However, if the file is not found, you want to return a custom error message in JSON format. How can you best achieve this mixed response type?
- ASP.NET Core's approach to preventing Cross-Site Request Forgery attacks involves using a token named _________.
- You've deployed an ASP.NET Core application, but users report they're not able to access CSS and images. Which middleware might you have forgotten to configure in Startup.cs?
- How does the "Worker Service" template in ASP.NET Core differ from the traditional web application templates?
- Which ASP.NET Core Identity option determines the number of invalid access attempts allowed before locking out a user account?