vb.net code behind page translates <br> into &lt;br> - how to prevent?

vb.net , html Orlando, United States
  • 12 years ago
    I have a textbox, and I want to put HTML line breaks (
    ) in between some of the text in the texbox. I place "
    " in the textbox in the code behind page, but when it renders it, it comes out as "<br>". How can I place a linefeed in a textbox? Or, for that matter, pass any HTML tag directly onto the web page? I've searched for a while without any success.
  • 12 years ago
    Okay, the question did not display correctly. An HTML line break (br as a tag) is rendered as ampersand followed by lt and then semicolon. How do I prevent the less than part of an HTML tag from being change to ampersand lt ; ?
  • 12 years ago
    Figured it out. I just needed to set the textbox to multiline, so the HTML is rendered not as an input, but as a textarea.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“My definition of an expert in any field is a person who knows enough about what's really going on to be scared.” - P. J. Plauger