question

Yahya-3144 avatar image
0 Votes"
Yahya-3144 asked JerryCai-MSFT commented

Getting QueryString in net standard

Hi

My Blazor net core 3.1 app references a net standard 2.1 class library project. In the referenced net standard 2.1 class library project I need to get the QueryString passed to the Blazor app. I am looking for a simple example of getting QueryString (using IHttpContextAccessor?). As its a net standard project I can not use HttpContext.Current.Request.QueryString.

Thanks

Regards

dotnet-aspnet-core-blazordotnet-standard
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You must not use IHttpContextAccessor within Blazor apps, have you checked these procedures? https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-context?view=aspnetcore-5.0#blazor-and-shared-state

0 Votes 0 ·

0 Answers