J
jason
The below code lists my files in sorted order, but does not display
the images in sorted order? Any suggestions?
Sub Page_Load()
dim pictures as New hashtable
dim filename as string = ""
dim i as integer
dim pn as string
Dim pics As New ArrayList(System.IO.Directory.GetFiles(Server.MapPath(Request("path")),"xxx/*.*"))
pics.Sort()
for i = 0 to pics.Count - 1
pn = pics.item(i)+" "
pn=pn.substring(28,30)
response.write(pn)
response.write("<br>")
pictures(pn) = "thumb.aspx?src=" & pn
repeater1.DataSource = pictures
Page.DataBind()
next
.... some html
<ASP
ataList id="repeater1" runat="server" RepeatLayout="Table"
Repeatcolumns="6">
<ItemTemplate>
<a href="<%# Container.DataItem.Key %>" target="_New">
<asp:Image
runat="server"
ImageUrl="<%# Container.DataItem.Value %>"
BorderStyle="OutSet"
BorderWidth="2"
Width=120 Height=100
/>
</a>
</ItemTemplate>
</ASP
ataList><p />
the images in sorted order? Any suggestions?
Sub Page_Load()
dim pictures as New hashtable
dim filename as string = ""
dim i as integer
dim pn as string
Dim pics As New ArrayList(System.IO.Directory.GetFiles(Server.MapPath(Request("path")),"xxx/*.*"))
pics.Sort()
for i = 0 to pics.Count - 1
pn = pics.item(i)+" "
pn=pn.substring(28,30)
response.write(pn)
response.write("<br>")
pictures(pn) = "thumb.aspx?src=" & pn
repeater1.DataSource = pictures
Page.DataBind()
next
.... some html
<ASP
Repeatcolumns="6">
<ItemTemplate>
<a href="<%# Container.DataItem.Key %>" target="_New">
<asp:Image
runat="server"
ImageUrl="<%# Container.DataItem.Value %>"
BorderStyle="OutSet"
BorderWidth="2"
Width=120 Height=100
/>
</a>
</ItemTemplate>
</ASP