skip to Main Content

.NET 6 Razor Pages SEO Friendly URL

I'm trying to create SEO friendly URL's using .NET 6 and Razor Pages (not MVC). From a razor page view: <a asp-page="/Post" asp-route-id="9">Test Link</a> I link to a corresponding page handler: [BindProperty] public PostViewModel? Post { get; set; } public…

VIEW QUESTION

Unable to get input value in Razor Page – Html

Do you know what to put at the asp-route-word, I am not able to find it. This is my code: <form class="d-flex" method="get"> <input class="form-control me-sm-2" type="search" placeholder="Search" id="searchWord" /> <button class="btn btn-secondary my-2 my-sm-0" type="submit" asp-controller="Word" asp-action="Index" asp-route-word="???"> Rechercher…

VIEW QUESTION
Back To Top
Search