You're developing a web application where you want to set up pages for different categories. The URL should look like /categoryName. How would you define the routing for this requirement?

  • Use attribute routing
  • Configure a conventional route
  • Use a query string
  • Define a wildcard route
To achieve URLs like /categoryName in ASP.NET Core, you can configure a conventional route. This involves setting up a route template in your application's startup, which specifies the desired URL structure and how it maps to controller actions.
Add your answer
Loading...

Leave a comment

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