Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2008-10-08
1
222 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

792 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