What keyword is used in the route template to define a variable segment?

  • {var}
  • [var]
  • $var$
  • :var
In a route template in ASP.NET Core, you use curly braces {} to define a variable segment. This allows you to capture dynamic parts of a URL, such as IDs or names, and pass them as parameters to the corresponding action method.
Add your answer
Loading...

Leave a comment

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