Tuesday, March 27, 2012

List items in a folder

I would like to be able to list a directory (or something like it)of the
contance of a certian folder. How can this be done on a web page?
TIA
JimThis is how you can do that with listbox web control, consider lstFileName
as listbox

Dim oDirectoryInfo As DirectoryInfo
oDirectoryInfo = New DirectoryInfo(hdnDirName.Value)
lstFileName.DataSource = oDirectoryInfo.GetFiles("*.resources")
lstFileName.DataTextField = "Name"
lstFileName.DataValueField = "Name"
lstFileName.DataBind()

--
Saravana
Microsoft India Community Star,
MCAD,SE,SD,DBA.

"James Rasmussen" <jmrasmus@.yrmc.org> wrote in message
news:ut7brliUDHA.2184@.TK2MSFTNGP10.phx.gbl...
> I would like to be able to list a directory (or something like it)of the
> contance of a certian folder. How can this be done on a web page?
> TIA
> Jim

0 comments:

Post a Comment