You internal loop misses a line needed to add the row to the table
if (Path.GetExtension(file).Equals(".txt"))
{
DataRow dtr = dt.NewRow();
dtr["tenalbum"] = Path.GetFileName(file);
dt.Rows.Add(dtr); // This line adds the new row to the rows collection of the table
}
By the way, you could extract only the files with txt extension using the GetFiles overload that takes a pattern argument
string[] files = Directory.GetFiles(dir, "*.txt");
And, as final optimization, I think you could simply write
List<string> files = Directory.GetFiles(@"d:\temp", "*.txt")
.Select(x => Path.GetFileName(x)).ToList();
DataList1.DataSource = files;
DataList1.DataBind();