-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link generation improvements #38121
Comments
@javiercn it seems this one never got broken into individual issues prioritized. Costing the umbrella as |
Consider the following code: services .AddRazorPages(options => options .Conventions .AddPageRoute ("/A/B", "/A/C")); Assume that the page <a asp-page="C" asp-route-id="0" >…</a > Then the result is <a href="/A/D?id=0" >…</a > It seems the only work-around is to make |
Shall i suggest to track this issue too ? #31476 |
When it comes to generating links, I would recommend using the page class. Example:
This causes the content of @page to be inserted in place of href For this you can create a provider that adds other constants, e.g. culture. |
Are you sure link generation can't be fixed on net7 ? So much energy is spent on minimal api and blarzors instead, not much on mvc I'm afraid :( |
@valeriob I echo your thoughts about MVC. So much wasted energy is being spent on improvements to minimal API just to mimic what you can already do in MVC. As for Blazor, how about showing some love for people that use alternatives such as htmx and/or petite-vue/alpine.js which compliment MVC and razor pages. The link generation improvements would benefit everyone. The specific issue I'm concerned with is #16960 which was a regression introduced with endpoint routing and has still not been addressed. |
We have a relatively big backlog of issues with regards to link generation changes that happened between traditional routing and endpoint routing. One of the biggest changes is in the way we deal with ambient values. Changes in endpoint routing can cause some abnormal behaviors when generating links.
a
tag-helpers #35376The text was updated successfully, but these errors were encountered: