copy text from xx line and paste it into textbox
so basically what i want to do is open a text file(a downloaded web page like html or php, notepad supports opening them), and then copy the text that there is in line 41 for example, from the file into a textbox in my project. would this be possible? the whole idea of this is that i download the web page of a youtube video, open it, copy the download link that's in line 41, put it into the textbox and then download the video.
Re: copy text from xx line and paste it into textbox
You'd use a WebClient to download the data. You can call DonwloadFile but I think you'd probably be better off calling DownloadString, because you don't really need a file.
Once you've got the data, you need to decide exactly what to do with it. If it really is text separated by line breaks then you can simply call String.Split, using ControlChars.NewLine, ControlChars.Lf or both as the delimiters, depending on the data. That will produce a String array, from which you can get any element(s) you want by index.