What's the best way to handle something like this:
Razor Code:
@if(!disableRowDiv) { <div class="row"> } <div>some content here</div> @if(!disableRowDiv) { </div> }
So that the Razor engine doesn't produce this error :
Parser Error Message:
The if block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup.
This should work
@if(!disableRowDiv) { @:<div class="row"> } <div>some content here</div> @if(!disableRowDiv) { @:</div> }
1.4m articles
1.4m replys
5 comments
57.0k users