In an e-commerce application, after a user successfully checks out, you want to redirect them to a confirmation page. Which action result can achieve this redirection?
- Redirect
- Ok
- View
- BadRequest
To achieve a redirection after a successful action, you should use the Redirect action result. It allows you to specify the URL to which the user should be redirected, typically a confirmation page in this case. The Redirect result returns an HTTP 302 status code, indicating a temporary redirect.
Loading...
Related Quiz
- What is the primary purpose of Razor views in ASP.NET Core?
- You've been tasked to deploy an ASP.NET Core application to a cloud platform that supports scaling out based on demand, but you want to minimize management overhead. Which service would be the best fit?
- Where in an ASP.NET Core project would you typically find database migration files?
- What is the primary difference between the _ViewImports.cshtml and _ViewStart.cshtml files in Razor?
- What is the significance of the @model directive in a Razor view?