Vì một số lý do mà ta muốn đưa một block code CSHTML vào một Div trong một View, theo cách suy nghĩ thông thường thì sẽ làm như sau:
if (i % 3 == 0)
{
<div class="item">
}
{ block code ....}
{
</div>
}
Visual sẽ báo lỗi: is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid.
{
@: </div>
}
0 comments:
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.