473,779 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

very easy text box multiline questions

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.cr lf,
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.WriteLi ne(drReader("qt y").ToString & " " &
drReader("part" ).ToString)
Me.txtDetails.T ext = drReader("qty") .ToString & " " &
drReader("part" ).ToString & ControlChars.Cr Lf
Loop

thanks
AP!
Nov 20 '05 #1
1 1338
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
9079
by: Christophe Cerbourg | last post by:
hi, Bonjour, I'm using PHPMailer class to send mails and it works fine for HTML ones. But I can't manage to send correctly a text formatted mail... I tried this : - $message = "first line*\n*second line"; - $message = "first line*\r\n*second line"; - $message = "first line*".chr(13).chr(10)*second line";
6
12750
by: Suresh Kumaran | last post by:
Hi All, Does anybody know the sytax in VB.NET to write the contents of a multiline text box to a text file? Appreciate help. Suresh
0
1789
by: raj | last post by:
I have multiline-text box in my C# application. User enter text into the multiline-text box, and without completing the whole line, user press Enter Key and go to the next line, by leaving the '\n'(new line character) in the string. I use this text to write to a database field and then write that field to an excel file. The string is not writing to a single line as it has the carriage return ('\n), wraps the text into the next line in...
0
1136
by: raj | last post by:
I have multiline-text box in my C# application. User enter text into the multiline-text box, and without completing the whole line, user press Enter Key and go to the next line, by leaving the '\n'(new line character) in the string. I use this text to write to a database field and then write that field to an excel file. The string is not writing to a single line as it has the carriage return ('\n), wraps the text into the next line in...
4
4809
by: Phil Diwell | last post by:
Hi all. I am trying to place text over a picturebox. I thought I coul do this by making the textbox.backcolor property = color.transparent. However this doesn't work (textbox doesn't support transparent backcolor) and so I am wondering if anyone knows how I can do this. I need to be able to put multiple lines of text over the picturebox, so using labels won't do it.
2
1515
by: gjtired | last post by:
Hi, I'm not sure the best way to do something and I hope someone can help me. I'm developing a web application that a user enters test questions in. I store the questions in a database. When a person takes the test I need to be able to display the questions. I can use a multiline text box but I want the user to see the entire question and not have to use the scroll bars. I also don't want the scroll bars visible if they are not used. I...
2
4610
by: Chris | last post by:
Hi We are using style sheets to set the font of our labels and text boxes. This has been working great until we required a text box with a textmode of Multiline. The control picks up the correct font/size until the text mode is changed from single line to multiline. We're currently using the H1, H2, H3 and Body tags for the page.
2
5830
by: Nathan Sokalski | last post by:
I have a multiline TextBox that I want to display the text used to create a control in an apsx file. I want each of these to be on a separate line in the TextBox. The only way I know of to place things on separate lines in a TextBox without doing it programmatically is the following: <asp:TextBox ID="txtMultiLine" runat="server" TextMode="MultiLine"> Line 1 Line 2 Line 3 </asp:TextBox>
2
9399
by: King | last post by:
Is there any other way to define multiline text in a XML file: <Help><!]> </Help>
0
9633
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10137
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8959
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7483
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.