I am searching for a string in a textbox in my web application. My output must be the line number of where the string can be found in the textbox.
To find the string in the textbox i am using IndexOf (which helps me make sure if the string is in the textbox or not). I know that if the string is in the textbox it will give me the number of characters as to where the string is.
Now is there a way of finding the line number???
(I was thinking that i go through the textbox starting from the first character all the way to string and as i pass by i check if there is a newline, but i dont know how to check if there is a new line in a textbox)
mjzammit 0 Newbie Poster
Ramy Mahrous 401 Postaholic Featured Poster
mjzammit 0 Newbie Poster
Ramy Mahrous 401 Postaholic Featured Poster
mjzammit 0 Newbie Poster
mjzammit 0 Newbie Poster
mjzammit 0 Newbie Poster
Ramy Mahrous 401 Postaholic Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.