asp.net mvc 4 - How to explicitly deactivate Razor code -
i follow pattern quite bit using razor:
@if (model.isalreadyconfirmed) { account has been confirmed. }
but doesn't work because it's expecting code. i'm forced this:
@if (model.isalreadyconfirmed) { @html.raw("this account has been confirmed.") }
or this:
@if (model.isalreadyconfirmed) { <span>this account has been confirmed.</span> }
also, feel free correct improper use of jargon.
@if (model.isalreadyconfirmed) { <text>this account has been confirmed.</text> }
there special tag called text prints out put in it. actual tag omitted in rendered html.
Comments
Post a Comment