H
Hrvoje Vrbanc
Hello all!
I have a small problem: I have an ASP.NET page that displays content of a
folder in a DataGrid (more precisely, it displays Name, Lenth and
CreationDate of the files).
Default sort order is by file Name. Howwever, I would like to sort the
collection by the CreationDate.
How to do it?
I use the following code:
Dim dirInfo As New DirectoryInfo(directoryPath)
Dim FileNo As Integer = dirInfo.GetFiles("*.*").Length
If FileNo > 0 Then
dgFiles.DataSource = dirInfo.GetFiles("*.*")
dgFiles.DataBind()
Else
dgFiles.Visible = False
End If
Thank you very much in advance!
Hrvoje
I have a small problem: I have an ASP.NET page that displays content of a
folder in a DataGrid (more precisely, it displays Name, Lenth and
CreationDate of the files).
Default sort order is by file Name. Howwever, I would like to sort the
collection by the CreationDate.
How to do it?
I use the following code:
Dim dirInfo As New DirectoryInfo(directoryPath)
Dim FileNo As Integer = dirInfo.GetFiles("*.*").Length
If FileNo > 0 Then
dgFiles.DataSource = dirInfo.GetFiles("*.*")
dgFiles.DataBind()
Else
dgFiles.Visible = False
End If
Thank you very much in advance!
Hrvoje