With RazorViewEngine, I can do this:
if (somecondition) {
<div> some stuff </div>
}
but I can't seem to do this (Razor gets confused):
if (somecondition) {
<div>
}
if (someothercondition) {
</div>
}
I have a situation in which I need to put my opening and closing html tags in different code blocks - how can I do this in Razor?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…