Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   how to make hyperlinks of existing files in a directory? (http://www.velocityreviews.com/forums/t643800-how-to-make-hyperlinks-of-existing-files-in-a-directory.html)

Ben 11-10-2008 02:07 PM

how to make hyperlinks of existing files in a directory?
 
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




Ben 11-10-2008 04:16 PM

Re: how to make hyperlinks of existing files in a directory?
 
ok, i found it: using Directory.GetFiles


"Ben" <be@fd.dc> schreef in bericht
news:%23OSkp2zQJHA.1164@TK2MSFTNGP03.phx.gbl...
> 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
>
>
>




Hillbilly 11-10-2008 04:31 PM

Re: how to make hyperlinks of existing files in a directory?
 
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_w...ing_ASPNET.all


"Ben" <be@fd.dc> wrote in message
news:%23OSkp2zQJHA.1164@TK2MSFTNGP03.phx.gbl...
> 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
>
>
>




All times are GMT. The time now is 08:22 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.