Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get a list of files on server with ASP.NET using a picker

Tags:

asp.net

Is there a component available list FileUpload which shows files on the server, not the client?

I am basically looking for a clean dialog box to select server side files, like the one used in FileUpload.

like image 878
Brettski Avatar asked Dec 08 '25 13:12

Brettski


1 Answers

Nope. There's not. That said, you can use a listbox, and load the files into it.

public sub file_DatabindListbox(directoryPath as string)
   for each fName as string in io.directory(directorypath).getfilenames()
     dim li as new listitem 
     li.text = io.path.getfilename(fName)
     li.value = fName
     myFileListbox.Items.Add(li)
   next
end sub 
like image 188
Stephen Wrighton Avatar answered Dec 11 '25 21:12

Stephen Wrighton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!