It’s my first post, hence hello 🙂
I want to conditionally open and close div. What am I doing wrong?
@foreach (var m in Model.Recipes)
{
if (left)
{
<div class="rec-line">
}
if (left)
{
</div>
}
}
You need to use the escape character to let the razor engine know that
<div>is text by using@:code: