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

I am trying to use .NET Core and Blazor to read parameter from GET string

$
0
0

I have a Blazor page like this:

@PAGE<h1>Hello, world!</h1><h2>The time on the server is @DateTime.Now  LAT:@Request.Query["lat"] LONG:@Request.Query["long"]</h2>

I am trying to read parameters, but I get an error:

enter image description here

I also tried

<h2>The time on the server is @DateTime.Now LAT:@Context.Request.Query["lat"] LONG:@Context.Request.Query["long"]</h2>

and

<h2>The time on the server is @DateTime.Now LAT:@HttpContext.Current.Request.Query["lat"]LONG:@HttpContext.Current.Request.Query["long"]</h2>

but the IDE doesn't understand Context / or HttpContext.Current


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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