❔ Asp-all-route-data's initial value is changed with asp-route-*

So, I have:
var parms = new Dictionary<String, String>
{
{"Nome", Nome.ToString() },
};
var parms = new Dictionary<String, String>
{
{"Nome", Nome.ToString() },
};

And I have
@foreach (Tipo tipo in ViewBag.Tipos)
{
<div>
<a asp-all-route-data="parms" asp-route-Nome="@tipo.Id">@tipo.Nome</a>
</div>
}
@foreach (Tipo tipo in ViewBag.Tipos)
{
<div>
<a asp-all-route-data="parms" asp-route-Nome="@tipo.Id">@tipo.Nome</a>
</div>
}
After this foreach, my parms value will have changed tot he last one in my ViewBag.Tipos I don't understand why this is happening and/or how to prevent it :(
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server