Razor Pages inline routing

IM trying to learn .Net Core and Razor Pages and I’m following this video step-by-step. The link starts at a specific time in the video where the presenter adds @page "{Id}" which allows him to consume the routing variable directly via RouteData.Values["Id"]. When i try this my web app stops working, giving result of Page not found. Soon as i remove it it works again. I’ve tried this in both Core 2.0 and 2.1.

Is anybody else able to do this and if possible, can you tell me what it is called so i could perhaps do some googling on it? I’m struggling to find relevant information on it.

submitted by /u/Derfaust
[link] [comments]

Leave a Reply