Results 1 to 3 of 3

Thread: [RESOLVED] Append to label with linefeeds ?

Threaded View

  1. #1

    Thread Starter
    Fanatic Member staticbob's Avatar
    Join Date
    Jan 2005
    Location
    Manchestershire, UK Cabbage: I do
    Posts
    619

    Resolved [RESOLVED] Append to label with linefeeds ?

    Guys,

    Why isn't this code working ? It should be reading text from rows in a datatable, then appending the text to a string along with a couple of line feeds for clarity. I'm then setting the label.text (guidetext) to the string.

    It is showing the text from the rows, but as one string without any linefeeds.
    I've also tried VbCrLF's too.

    Cheers
    Bob


    VB Code:
    1. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         'Put user code to initialize the page here
    3.  
    4.         Dim sText As String
    5.         Dim dt As New DataTable
    6.         db.Guidelines.Fill(dt, CType(Session("Section"), Integer))
    7.         For Each row As DataRow In dt.Rows
    8.             sText += vbNewLine & vbNewLine & row("Text")
    9.         Next
    10.         guidetext.Text = sText
    11.     End Sub
    Last edited by staticbob; Sep 6th, 2005 at 08:29 AM.

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