Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

SupplyParameterFromQuery not working in Blazor app

$
0
0

In my .NET 8 Blazor Server App, I am using [SupplyParameterFromQuery] to retrieve query string parameters as recommended by Microsoft here.

Home.razor

@page "/home"<PageTitle>Home</PageTitle><p><label><input @bind="zipcode" /></label></p>@code{    [SupplyParameterFromQuery]    public int? zipcode { get; set; }}

To test, I navigate to my app with this URL: https://localhost:1234/home?zipcode=90210

But zipcode is NULL

My guess is that [SupplyParameterFromQuery] is obsolete or this is a bug. Maybe there is another way I'm supposed to get query parameters?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>