Solved

asp scriptto  populate a select list wirh .xls files from a folder in the web

Posted on 2008-10-08
1
220 Views
Last Modified: 2008-10-08
I need to have a select list populated with certain files (mainly .xls) that are in a folder on the web.

0
Comment
Question by:robrodp
1 Comment
 
LVL 3

Accepted Solution

by:
sam_norian earned 500 total points
ID: 22671495
Hi, How about this....

<%

dim fs,fo,x

set fs=Server.CreateObject("Scripting.FileSystemObject")

set fo=fs.GetFolder(Server.MapPath(".") & "\..\Your Folder\")

%>

<select name="FileList">

<%
 

for each x in fo.files

  Response.write("<option value=" & CHR(32) & x.name & CHR(32) & ">" & x.name & "</option>")

next
 

set fo=nothing

set fs=nothing

%></select>

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now