Razor doesn’t understand unclosed html tags

Try like this:

if (somecondition) {
    @:<div>
}

Leave a Comment