By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,461 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,461 IT Pros & Developers. It's quick & easy.

very easy text box multiline questions

P: n/a
hi, i have a datareader returning a 2 column recordset with multiple
rows what i want to display in a textbox. here is my code. only the
last line shows up in the text box but all gets written to the
console, so i know they are there. I have tried controlchars.crlf,
chr(13), vbcrlf, none worked. what did i do wrong? it is definitely
a multiline text box because at runtime i can type in multiple lines..

Do While drReader.Read
Console.WriteLine(drReader("qty").ToString & " " &
drReader("part").ToString)
Me.txtDetails.Text = drReader("qty").ToString & " " &
drReader("part").ToString & ControlChars.CrLf
Loop

thanks
AP!
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Cor
Hi Antonio,

It is multiline, but you say in your program everytime

textbox1.text = String

While you did want to say something as

Textbox1.text = Textbox1.text & String

Now I show it you, you probably see it and thinks "stupid me" I did know
this
Happens to everybody sometimes.
:-))

There will maybe someone who tells you that you better can use
Stringbuilder, I don't give you that advise this time. Or you textboxes has
to contains every time more than 100 lines.

Than I would look for Stringbuilder, Stringbuilder it is much faster than
the code I showed above..

Cor
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.