1.

How to get the name of all folder and bind that list to dropdownlist

Answer»

Below CODE will HELPS us to get LIST of all the folder name in SPECIFIED folder and bind that list to dropdownlist
DirectoryInfo dd= new DirectoryInfo("C: ");
DirectoryInfo[] dd= dd.GetDirectories();
foreach (DirectoryInfo dinfo in dd)
{
DropDownList1.Items.Add(dinfo .Name);
}



Discussion

No Comment Found