0
I need to format this number string, which is returned from an api:
As I wish: 83,951,583.
Página Razor:
<h3>Mundo</h3>
<div class="card bg-primary text-white mb-3" style="max-width: 14rem;">
<div class="card-body">
<h5 class="card-text">Casos confirmados</h5>
<h3>@Model.Global.TotalConfirmed</h3>
</div>
</div>
You have tested any of these options> https://docs.microsoft.com/pt-br/dotnet/standard/base-types/standard-numeric-format-strings
– Antonio Rio
I tried, but I could not implement in Razor page.
– Eduardo Nogueira
Hello Eduardo. Use
[email protected]('{0:c}', <valor vai aqui>)
with the parameter'c'
, as explained in https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings?redirectedfrom=MSDN ... exchange the<valor vai aqui>
value you want to pass from your Model.– Guilherme Nascimento
I got it some other way. Thank you!
– Eduardo Nogueira