Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am creating a web app (C#.Net) that allows a user to upload documents to a remote server (I am able to do this fine), however, I am unsure of how to display/read the folder and its files on the screen once it is on the server. Any ideas on how to do something like this or know of any good documentation out there?

 

Thanks for your help...

  • *Gurus*
Posted
Dim files() As String = System.IO.Directory.GetFiles(Request.PhysicalApplicationPath & "mirror\\downloads\")
Dim file As String

For Each file In files
If Not file.EndsWith("default.aspx") Then
	Response.Write("<a href=""http://mirror.incandesoft.com/downloads/" & System.IO.Path.GetFileName(file) & """>" & System.IO.Path.GetFileName(file) & "</a><br />")
End If
Next

Posted

Thanks very much.

 

Does anybody know how to delete a file on the server? I can upload it and display it now, but I just need to be able to delete it?

 

Thanks for your help...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...