I want to select a text file using a FileUpload control and read it into a string array.
I would like to understand if instead of using StreamReader.ReadLine I can use File.ReadLines.
I searched for some examples online but always find FileUpload control associated with StreamReader. I am missing the knowledge to understand why.
To complete the question: I am working on a web application. I am using StreamReader and it works fine but if I try to use File.ReadLines(path)
where path is FileUpload1.FileName
I cannot get the fullpath.