Razor View if statement incorrect
My last 'if' statement is rendering as text. How can i fix that?
See how the grey highlighting for the 2nd 'if' statement completes on the end of the last 'if' statem开发者_JAVA技巧ent?
thanks
Razor thinks that the previous if
hasn't ended yet, since you're still inside the <div>
s.
You need to prefix the <div>
s with @:
to prevent Razor from matching the tags.
精彩评论