1
I have a text in the database like this: Example only:
<ul>
<li><strong> asdsdasdadsdadsa <em>asdsd asdsdasdasdad</em></strong>
<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
<tbody>
<tr>
<td>asdas</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
</li>
</ul>
The information is with the HTML tags, I want to be able to bring this text and display in a readable way on the page. Where these tags disappear and show only the text. I used this code:
public ActionResult Index(int id)
{
QuemSomos model = _repositorio.BuscarPorId(id);
var quemSomosMapper = Mapper.Map<QuemSomos, QuemSomosViewModel>(model);
ViewBag.conversao = HttpUtility.HtmlDecode(quemSomosMapper.Texto.ToString());
return View(ViewBag.conversao);
}
But it’s not working. I’d like some help if it’s possible.
Alysson, you want to remove HTML tags or interpret HTML in the view?
– Jéf Bueno