Use namespace System.IO
<asp:Repeater id='Repeater1' runat='server'>
<ItemTemplate >
<%# DataBinder.Eval(Container.DataItem, 'Name').ToString() %>
</ItemTemplate>
</asp:Repeater>
VB.NET
Dim dir As New DirectoryInfo(Server.MapPath('.'))
Repeater1.DataSource = dir.GetDirectories
Repeater1.DataBind()
C#
DirectoryInfo dir = new DirectoryInfo(Server.MapPath('.'));
Repeater1.DataSource = dir.GetDirectories();
Repeater1.DataBind();
Share with