I
Ing. Rajesh Kumar
Hi everybody
I am populating a dropdown list with directory names from a given directory. But how can i get the names for all the sub sub sub directories ?
What i want is :
Let's say i have a directory which contains DIR_A, DIR_A contains DIR_B, DIR_B contains DIR_C.
I want to populate dropdown list as :
<asp:ListItem Value="DIR_A" Text="DIR_A"/>
<asp:ListItem Value="DIR_A/DIR_B" Text="DIR_B"/>
<asp:ListItem Value="DIR_A/DIR_B/DIR_C" Text="DIR_C"/>
Following code does not give the result i want
Dim dirInfo as New DirectoryInfo(Server.MapPath(path))
ddl_1.DataSource = dirInfo.GetDirectories()
Thanks in advance
Raja
I am populating a dropdown list with directory names from a given directory. But how can i get the names for all the sub sub sub directories ?
What i want is :
Let's say i have a directory which contains DIR_A, DIR_A contains DIR_B, DIR_B contains DIR_C.
I want to populate dropdown list as :
<asp:ListItem Value="DIR_A" Text="DIR_A"/>
<asp:ListItem Value="DIR_A/DIR_B" Text="DIR_B"/>
<asp:ListItem Value="DIR_A/DIR_B/DIR_C" Text="DIR_C"/>
Following code does not give the result i want
Dim dirInfo as New DirectoryInfo(Server.MapPath(path))
ddl_1.DataSource = dirInfo.GetDirectories()
Thanks in advance
Raja