剃须刀有什么问题

时间:2013-01-01 12:10:39

标签: asp.net razor

@for (int counterA = 0; counterA < TotalIterations; counterA++)
{
    <tr>
    @for (int DayCounter = (counterA * 10); DayCounter <= ((counterA + 1) * 10) - 1; DayCounter++)
    {
        <td>a

        @{
            string @isCurrent = "0";
            if (1 == 1)
            {
            }
        }
        </td>
    }
    </tr>
}

1 个答案:

答案 0 :(得分:2)

以下行可能是问题:

string @isCurrent = "0";

此处无需放置@。只需写下:

string isCurrent = "0";