I want to read the values of each rows in a textfile to a ListBox control. The file needs to be uploaded on the client side.
I have the code to read from a fixed file but I don't know how to upload a file and then read from it.
The code to read from a normal file is:
protected void Button1_Click(object sender, EventArgs e)
{
FileInfo file = new FileInfo("file");
StreamReader stRead = file.OpenText();
while (!stRead.EndOfStream)
{
ListBox1.Items.Add(stRead.ReadLine());
}
}