C# Razor для Loop JavaScript
<script>
@for(int i = 0; i < 5; i++)
{
<text>
// Use <text> node to call js inside razor
var that = @i
</text>
}
</script>
Av3
<script>
@for(int i = 0; i < 5; i++)
{
<text>
// Use <text> node to call js inside razor
var that = @i
</text>
}
</script>
<ul>
@for (int i = 0; i < names.Count; i++)
{
<li>@names[i]</li>
}
</ul>