protected void GetFileValues() { var fileEntries = Directory.GetFiles(Server.MapPath("DataFiles"), "*.whl"); List<string> list = new List<string>(); foreach(string files in fileEntries) { string lineRead; StreamReader reader = new StreamReader(files); while ((lineRead = reader.ReadLine()) != null) { list.Add(lineRead); }//end while reader.Close(); ListBox1.Items.Add(list[5].ToString()); } }
current output--------------------Correct output John------------------------------> John John------------------------------> Aubrey John------------------------------> Thomas John------------------------------> Neil
ListBox1.Items.Add(list[5].ToString());
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)