how to make hyperlinks of existing files in a directory?

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

Hi,

there are a lot of files (unknown number), all ending with .aspx, in
directory c:\inetpub\wwwroot\mydirectory\
How can i make a hyperlink for each of those files and make that list of
hyperlink available to the users?
Thanks for help
Ben
 
You can use this article [1] and many others found searching the web to
learn to access the file system and retrieve folder and filenames. You can
then use each filename as the value for an anchor element's href attribute
and if wanted its title text. Use a foreach loop to write the results into a
StringBuilder object you can then do something with. That's one common way
to do what you asked about and all of it --every step-- can be found
documented or blogged on the web at least 10 different ways.

[1]
http://aspalliance.com/920_Working_with_Files_and_Directories_using_ASPNET.all
 
Back
Top