I have this code_behind that get some info from an folder and then show the files on my page.
Sub fileinfo()
Dim objDI As New System.IO.DirectoryInfo(Server.MapPath("upload/files/"))
Dim allFile As New ArrayList()
allFile.AddRange(objDI.GetFiles("*.png"))
allFile.AddRange(objDI.GetFiles("*.jpg"))
allFile.AddRange(objDI.GetFiles("*.bmp"))
allFile.AddRange(objDI.GetFiles("*.gif"))
allFile.AddRange(objDI.GetFiles("*.pdf"))
allFile.AddRange(objDI.GetFiles("*.doc"))
allFile.AddRange(objDI.GetFiles("*.docx"))
Me.showfiles.DataSource = allFile
Me.showfiles.DataBind()
End Sub
Then i have this code on my main page, but i get an table how can i do so i only get the UL/LI list !?
Im new to this and not a pro.
<ul class="thumbnails">
<asp:DataList ID="showfiles" runat="server" RepeatColumns="5" CellPadding="10">
<ItemTemplate>
<li class="span2"><a class="thumbnail" href="#"><asp:ImageButton ID="folderfiles" runat="server" ImageUrl='<%# string.Format("upload/files/{0}", DataBinder.Eval(Container.DataItem,"Name")) %>' ToolTip='<%# Bind("Name") %>' height="82" width="119" /></a></li>
</ItemTemplate>
</asp:DataList>
</ul>
Okay in that case just set the property
RepeatLayout="flow"in datalist i.e.