|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Does anyone know where I could find an example of displaying the filenames in a windows explorer folder in asp.net/c#.net?
I want to just display every .jpg that's in this folder so I thought if I could figure out how to display all filenames I would be all set. All files in the folder are jpg's. Thanks. |
|
#2
|
|||
|
|||
|
Hey Rich,
Check out the System.IO.Directory class specifically the GetFiles Method. Here is an example. Hope those two links help. |
|
#3
|
||||
|
||||
|
Hi, could anyone give an example of how to sort the order of the files? I would like to list the directory by LastWriteTime, I was trying to do it with Array.Sort() but was unable to get it to work.
Any tips would be appreciated, thanks. |
|
#4
|
||||
|
||||
|
You can write a custom sort comparison function (IComparer) which you pass in to Array.Sort(). The comparison function will take in 2 file objects as args and compare the 2 dates to determine which one comes first in the list
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > .Net Development > Displaying contents of a folder in .net |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|