Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello world,

as the title says, I need help for writing a small piece of code in my webserver (C#)

It should look like this:
If a client visits http://server address/Directory , then they can see something like this:
http://roshanbh.com.np/wp-content/uploads/2008/03/directory-listing.gif[^] (example pic from Internet)

Hope you understood and can help me....
Posted
Comments
fjdiewornncalwe 19-Mar-13 15:44pm    
What's the problem. You need the System.IO namespace and you need to compile the FileInfo and DirectoryInfo information and then render it to a page that represents the data how you want it to look. You haven't given enough information for an answer that is more comprehensive.
atunahkur 19-Mar-13 16:10pm    
It should look "classical". A table that contains name, size and date when created
What have you tried so far ?
atunahkur 19-Mar-13 16:51pm    
I have tried (now) these solutions that Marciej Los recommended, but these are not things that i mean. Idea is that when a client visits http://server address/dir , then this "dir" will be like folder view in browser.
Sergey Alexandrovich Kryukov 19-Mar-13 16:55pm    
Why, I wonder?
—SA

1 solution

 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 19-Mar-13 16:55pm    
Sure, a 5. And also, HTTP servers usually have directory listing option, which can be applied to certain directories. It will show directory content automatically. Of course, this option is considered unsafe.
—SA
Maciej Los 19-Mar-13 16:57pm    
Thank you, Sergey ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900