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

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -