我在尝试使此代码与剃须刀一起使用时遇到问题
@for (int i = 0; i < Model.Count(); i++)
{
<ul>@createSubastaContainer(Model.ElementAt(i))
if (i % 5 == 0)
{
</ul>
}
}
如果元素是 5 的乘积,我想要什么打印结束</ul>
我的代码有什么问题,因为它一直在打印</ul>
以及表达式本身
更新
基于红色的@marteljn 在我进行更改时回答它会引发异常
The for block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup.