To read a query string value, there is the [Parameter] [SupplyParameterFromQuery]
@page "/"
<span>MyValue: @MyValue</span>
@code
{
[Parameter]
[SupplyParameterFromQuery]
public string MyValue { get; set; }
}
Source: Weston Walker on Twitter: "TIL in .NET Blazor you can get query strings from the URL and set them to a variable with the [SupplyParameterFromQuery] attribute. I'm finding it super handy for Oauth callback scenarios where you get a code back in the url from a external service. https://t.co/ERvhlQOlC1" / Twitter
Postar um comentário
Nenhum comentário :
Postar um comentário