I have a razor view where I'm currently using code that looks something like this:
@if(Model.IsLink)
{
<a href="...">
}
Some text that needs to appear
@if(Model.IsLink)
{
</a>
}
This works but the code doesn't feel clean. Is there a better/more accepted way of accomplishing this pattern?