I am new to Asp.Net and I am having a problem using a layout. I have a div and inside is a p tag, depending on if the embedded c# flip is true or false I would like it to be an empty p tag or a p tag with content.
Problem: This occurs when there is nothing being placed inside the div tag. It will generate a lot of space which is stopping me from using the :empty css tag because there is technically content inside it.
My code is as such:
<div>
@if (flip = true){
<p>text</p>
}
else{}
</div>