473,480 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reading from a text box control?

2 New Member
Hey guys,

I am new to the forum and to vb.net. I have taken a class in it, and have the basic ideas of this language.

I am trying to create a program that lets me input multiple lines of text into a multiline text box, which then will sort through and find data that has only three consecutive lines. Let's say I have an entire database about authors. This database will look something like this:
Mark Twain
"The Adventures of Tom Sawyer"
"A Dog's Tale"

Twain, Mark, pseudonym of Samuel Langhorne Clemens (1835-1910), American writer and humorist, whose best work is characterized by broad, often irreverent humor or biting social satire. Twain's writing is also known for realism of place and language, memorable characters, and hatred of hypocrisy and oppression.

This would continue for a list of authors. I want to be able to copy and paste the entire database (not terribly large) into a text box and output only the authors name and the two lines below it.
ie.
Mark Twain
"The Adventures of Tom Sawyer"
"A Dog's Tale"

So basically this would return authors name's and their two books to a file.
How is the best way to approach this?

I tried looking at the streamreader/writer, but only works for files, as opposed to controls. Could someone give me some tips as to solve this problem?

Thanks for your time,

dahnealdo
May 18 '07 #1
1 1088
Plater
7,872 Recognized Expert Expert
There is a StringReader/StringWriter class which may help you.

You could also attempt to do something like:
string[] mylines=mytextbox.text.Split("\r\n");

And then loop through each line, looking for blanks or something?
May 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
16850
by: David Gray | last post by:
Greetings all, I'm working on a program that allows a user to enter notes in a multiline textbox. I would like to be able to read the contents of the textbox (as records - one per line) and...
4
2335
by: Mateo | last post by:
Hi! I have labels on my page (some are web forms controls, and some are plain HTML labels), and I need Mozilla compatibile way for reading label value. For example, in IE I can use this:...
1
6736
by: Magnus | last post by:
allrite folks, got some questions here... 1) LAY-OUT OF REPORTS How is it possible to fundamentaly change the lay-out/form of a report in access? I dont really know it that "difficult", but...
3
3618
by: dale zhang | last post by:
Hi, I am trying to read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp The article author is using PictureBox for windows...
0
1314
by: Steve B. | last post by:
Hi all, I'm looking for a pretty way to globalize an ASP.Net application. I base on the Globalization Architecture for ASP.NET article from the MSDN Library. If I have a user control...
7
7735
by: Drew Berkemeyer | last post by:
Hello, I'm using the following code to read a text file in VB.NET. Dim sr As StreamReader = File.OpenText(strFilePath) Dim input As String = sr.ReadLine() While Not input Is Nothing...
3
1784
by: lizii | last post by:
i have a file - which on each line has some data i need to fill into a box - now although reading in the data is simple enough and putting it in the correct box will be no problem, as i can just...
13
1912
by: Marc | last post by:
The first part of the below writes the name and location of all buttons on a from to a text file. The second part reads that information back in and recreates the buttons. My problem is reading...
1
1640
by: ChrisFrohlich | last post by:
ASP.NET 2.0 with Text DataTypes: I've got a similar question going in the SQL group, but I was wondering if anyone has successfully implemented reading/writing character data from a Text datatype...
4
2081
by: Shark | last post by:
Hi, I need a help. My application reads data from COM port, this data is then parsed and displyed on: 1. two plotters 2. text box. I'm using Invoke method to update UI when new data is...
0
7037
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,...
0
7034
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7076
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...
1
6732
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4768
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...
0
4472
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2990
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...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.