Hi Sorci
first of all create a table to bind value from file
datatable comboDT=new datatable();
comboDT.columns.add("files",typeof(string)); //To add a column to bind the files name
USING (StreamReader sr = new StreamReader("TestFile.txt")) //Reading file
{
String line;
while ((line = sr.ReadLine()) != null)
{
comboDT.rows.add(line) //To add the line to the table
}
}
where the table is filled up with data from file now you can bind the table with combo box
combobox.displaymeber="files"; //its for display purpose so which column u want to display specify the column name
combobox.valuemember="files" //this column not display
combobo.datasource=comboDT //bind the datatable to combo box
Now files names were binded with combo box
Regards
palan