c# - Razor and half finishing html tags -


how make possible?

@if(item.i % 2 == 0) {    <div class="row"> }         @if(item.i % 2 == 0) {    </div> } 

without complaining haven't finished tag off , thinking haven't put } @ end of if statement

you need prefix both lines @: prevent razor parser parsing html tags.

@if(item.i % 2 == 0) {    @:<div class="row"> }         @if(item.i % 2 == 0) {    @:</div> } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -