喜在循環添加變量我想知道我怎麼添加數字沒有在foreach循環顯示他們,而 expamle:剃刀:不顯示它
@{ int intVariable = 0; }
@foreach(var item in @Model.Collection)
{
@(intVariable += item.MyNumberOfInteres) //->how can I calculate this without it being rendered to the website ?
//some Html code.......
}
有人能幫忙嗎?
歡呼
sushiBite
努力使今天在第幾行,並與 報價一切@ { 難道這裏的一切 } – 1myb