Capturar query string no blazor c#
@using Microsoft.AspNetCore.WebUtilities
@inject NavigationManager nManager
// Capturando a query string da url
private void PegaQueryString()
{
var uri = nManager.ToAbsoluteUri(nManager.Uri);
var queryStrings = QueryHelpers.ParseQuery(uri.Query);
if (queryStrings.TryGetValue("pesquisar", out var name))
{
txtPesquisar = name;
}
}