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> }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With