Consider the following code in VB9:
Dim text = "Line1<br/>Line2"
Dim markup = <span><%= text %></span>.ToString
While I was hoping markup would end up being <span>Line1<br/>Line2</span>
, it actually evaluates to <span>Line1<br/>Line2</span>
.
Is there any way to get the value of the variable not to be HTML encoded?
P.S.: This is an oversimplified example of what I'm trying to do. I know this could be rewritten a number of ways to make it work, but the way my code is constructed, un-encoding the variable would be optimal. If that's not possible, then I'll go down a different road.
More detail: The "text" is coming from a database, where a user can enter free-form text, with carriage returns. The output is HTML, so somehow I need to get the value from the database and convert the carriage returns to line breaks.