List items in a folder

Discussion in 'ASP .Net' started by James Rasmussen, Jul 24, 2003.

  1. 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
     
    James Rasmussen, Jul 24, 2003
    #1
    1. Advertisements

  2. James Rasmussen

    Saravana Guest

    This 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" <> wrote in message
    news:...
    > 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
    >
    >
     
    Saravana, Jul 25, 2003
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott324
    Replies:
    3
    Views:
    4,662
    Jason Kester
    Oct 27, 2005
  2. Gilles Kuhn
    Replies:
    0
    Views:
    579
    Gilles Kuhn
    Sep 15, 2003
  3. Tony Tone
    Replies:
    0
    Views:
    688
    Tony Tone
    Apr 28, 2006
  4. Tony Tone
    Replies:
    2
    Views:
    8,578
    Marina Levit [MVP]
    Apr 28, 2006
  5. mc
    Replies:
    5
    Views:
    1,920
    Walter Wang [MSFT]
    Jun 26, 2006
  6. John Dalberg
    Replies:
    0
    Views:
    673
    John Dalberg
    Jan 19, 2007
  7. Anjan Bhowmik
    Replies:
    1
    Views:
    671
    Misbah Arefin
    Feb 14, 2008
  8. divya
    Replies:
    1
    Views:
    1,261
    Munna
    May 28, 2008
Loading...