css - Display data from database without being effected by html tags -
in database there html tags , such as
hello <br/> world
and use following code in view display data:
<span> @table.text </span>
but problem data displayed break line , displayed hello world
and same problem happen other html tags such <a> tag
or <img> tag
. in other words, want display data database without change. how can solve problem ?
try this:
@html.raw("hello <br/> world".replace("<br/>",""))
Comments
Post a Comment