I'm using cshtml pages with webmatrix, i'm trying to render the html that is stored in my db, but the output is like <b>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </b>
instead of Lorem ipsum dolor sit amet, consectetur adipiscing elit. (This is just an example to explain what is happening)
I'm storing in ntext
datatype.
Here is me code.
@{
var db = Database.Open("myDB");
var selectQueryString = "SELECT * FROM noticias ORDER BY id";
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<style>
p {color: #f00;}
</style>
</head>
<body>
@foreach(var row in db.Query(selectQueryString)){
<p>@row.header</p>
<p>@row.description</p>
}
</body>
</html>