I'm trying to read the following csv file:
Column1,Column2,Column3
MyData1,MyData2,MyData3
MyData11,MyData22,MyData33
Before I had the file stored locally and I would read it into my object like this:
string path = myPath;
var content = File.ReadAllLines(path)
                    .Skip(1)
                    .Select(x => x.Split(','))
                    .Select(x => new MyObject
                    {
                        Column1= x[0],
                        Colum2= x[1],
                        Column3 = x[2]
                    });
This worked fine for me. However, I now have a requirement to use the file upload control to select a file and then read from the file selected. I have no idea how to accomplish the same thing above. Any ideas?
 
     
    