开发者

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?

Razor View if statement incorrect

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜