|
-
Sep 6th, 2005, 06:47 AM
#1
Thread Starter
Fanatic Member
[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:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim sText As String
Dim dt As New DataTable
db.Guidelines.Fill(dt, CType(Session("Section"), Integer))
For Each row As DataRow In dt.Rows
sText += vbNewLine & vbNewLine & row("Text")
Next
guidetext.Text = sText
End Sub
Last edited by staticbob; Sep 6th, 2005 at 08:29 AM.
-
Sep 6th, 2005, 08:58 AM
#2
Frenzied Member
Re: Append to label with linefeeds ?
You need to replace line feeds with the HTML line break (<br> or <br /> depending which version you are using).
DJ
If I have been helpful please rate my post. If I haven't tell me!
-
Sep 6th, 2005, 09:35 AM
#3
Thread Starter
Fanatic Member
Re: Append to label with linefeeds ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|