Razor @onclick не работает, когда страница использует параметры URL-адреса в приложении Blazor ⇐ C#
-
Anonymous
Razor @onclick не работает, когда страница использует параметры URL-адреса в приложении Blazor
I've run into an issue in a Blazor project. When I pass in URL parameters, the @onlick events are no longer working. I'm creating .cshtml pages and populating them with Razor components.
The following code does NOT work:
@page "/workspace/{WorkSpaceId}" ...cshtml page code This code works perfectly fine:
@page "/workspace" ...cshtml page code Components are rendered like so:
@(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) Why does adding the URL parameter cause such an issue and how do I fix it?
Источник: https://stackoverflow.com/questions/781 ... -blazor-ap
I've run into an issue in a Blazor project. When I pass in URL parameters, the @onlick events are no longer working. I'm creating .cshtml pages and populating them with Razor components.
The following code does NOT work:
@page "/workspace/{WorkSpaceId}" ...cshtml page code This code works perfectly fine:
@page "/workspace" ...cshtml page code Components are rendered like so:
@(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) Why does adding the URL parameter cause such an issue and how do I fix it?
Источник: https://stackoverflow.com/questions/781 ... -blazor-ap
Мобильная версия