|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
code fragment that reads the contents of a directory and generates links automatically
<i><b>Originally posted by : Fox (dfox@paradyszmatera.com)</b></i><br /><br />Does anyone know of any asp code that will read the contents of a directory and generate links automatically?<br /><br />Thanks - Fox
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Mage (mage@baltnet.ru)</b></i><br />Hi, Fox!<br /><br />Try to use my code below but ensure that your directory has at least Read NTFS permission from the anonymous account or you will get permission denied error.<br /><br />-------* Here we go *---------------<br /><% Set YourDir=Server.CreateObject("Scripting.FileSystemObject")<br />Set YourFiles=YourDir.GetFolder(Server.MapPath("/YourDirectoryWithReadPermission"))<br />For each filefound in YourFiles.files<br />%><br /><img src="yourIconIfYouNeedIt"><br /><a href="<%=Server.MapPath("/YourDirectoryWithReadPermission")%>/<%=filefound.Name%>"><%=filefound.Name%></a><br><br /><br /><% Next %><br />----------------* End of Code *---------------<br /><br />Best regards,<br /><br />Mage<br /><br />------------<br />Fox at 4/10/2001 9:20:07 AM<br /><br /><br />Does anyone know of any asp code that will read the contents of a directory and generate links automatically?<br /><br />Thanks - Fox
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > code fragment that reads the contents of a directory and generates links automatically |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|