|
martinchisholm -> RE: using file system object to view directory (12/8/2001 12:07:04)
|
Hi, I think your code is correct, just slightly in the wrong order. You are looping the creation of the option box as well as the content. I think by simply moving the option box make up outside of the loop will solve your problem, try the below: <% Set MyDirectory=Server.CreateObject("Scripting.FileSystemObject") Set MyFiles=MyDirectory.GetFolder(Server.MapPath("/teamhs/images")) %> <select name="choose"> <% For each filefound in MyFiles.files %> <option><% =filefound.Name %></option> <% Next %> </select>
|
|
|
|