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. Advertising

  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. Advertising

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. Gilles Kuhn
    Replies:
    0
    Views:
    441
    Gilles Kuhn
    Sep 15, 2003
  2. Bart Van Hemelen
    Replies:
    2
    Views:
    4,676
    Bart Van Hemelen
    Sep 4, 2006
  3. Larry Bud
    Replies:
    13
    Views:
    7,703
    Larry Bud
    Jan 7, 2008
  4. Anjan Bhowmik
    Replies:
    1
    Views:
    477
    Misbah Arefin
    Feb 14, 2008
  5. divya
    Replies:
    1
    Views:
    1,093
    Munna
    May 28, 2008
Loading...

Share This Page