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

Issues changing the value of an element in an array in matlab -

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -