Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read certain lines
#1
Hello y'all

How can I read a certain line from a textbox?
Like I want to read the second line out of the 100.

Thanks
#2
To get the second line you would do something like this:
[code2=vbnet]Dim secondLineText As String = textbox.Text.Split(vbNewLine)(2)[/code2]

Hopefully this helps!
My Blog | My Setup | My Videos | Have a wonderful day.
#3
But now it reads two lines;
An empty line
Line2

How can you remove that from it?
#4
Well, you would simply alter the code a little:
[code2=vbnet]Dim secondLineText As String = textbox.Text.Split(vbNewLine)(2).Remove(0,1)[/code2]
My Blog | My Setup | My Videos | Have a wonderful day.


Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I read a link from mysql databse??? mnxford 9 30,570 04-12-2013, 06:27 PM
Last Post: brandonio21
  Convert 2 lines to one brco900033 2 11,022 02-23-2013, 11:04 AM
Last Post: brco900033
  Read and delete lines brco900033 6 20,999 09-16-2012, 09:38 AM
Last Post: brandonio21
  How to write string query on multiple lines kismetgerald 1 8,428 08-29-2012, 04:01 PM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)