Results 1 to 2 of 2

Thread: <br /> tag not being rendered correctly.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Posts
    17

    <br /> tag not being rendered correctly.

    I'm building an application that outputs a list of usernames to an HTML document. I'm using this to generate a string:

    Code:
            For y As Int16 = 0 To intBuddyList - 1
                strBuddyListHTML = strBuddyListHTML & strBuddyList(y) & "<br />"
            Next
    The resulting string is then put into an HTML document. The problem is, when I load the document, the brackets are displayed literally. When I view the source, I see this:

    Code:
    buddy1&lt;br /&gt;buddy2&lt;br /&gt;buddy3&lt;br /&gt;buddy4&lt;br /&gt;tbuddy5&lt;br /&gt;tbuddy6&lt;br /&gt;
    Is there a way to preserve the brackets in the HTML tags?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: <br /> tag not being rendered correctly.

    It's an educated guess but try this:
    Code:
    strBuddyListHTML = strBuddyListHTML & strBuddyList(y) & "<<br />>"
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width