Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi all,

I want to retrieve file name in text box with formats like doc,xls,pdf,jpeg,png,vedio,txt etc from particular directory and then store it to database.

After that when i click any row in gridview that file will open.

its very urgent.

This is my requirement

for archiving all type of

documents that are received by emails or scanned pertaining

to a job or transaction
Posted
Updated 26-Jan-11 22:58pm
v2
Comments
Sandeep Mewara 27-Jan-11 1:47am    
You say it's urgent so please share what effort have you made so far on your own?
Ankur\m/ 27-Jan-11 2:14am    
What I understand is - you need to read all files from a directory, retrieve the file types and then save all/some of them to database. Why do you want to save it to database if it is already present on the disk on the server? Or do you need the clients to upload files?
Are you sure it's an ASP.NET application?
skaftabali 27-Jan-11 2:50am    
sorry i want retrieve file name on textbox
Sandeep Mewara 27-Jan-11 3:48am    
and we want to see some effort from your side.
R. Giskard Reventlov 27-Jan-11 3:29am    
Poor question: either homework or you've been given work that you don't know how to do. Make some effort to research and learn on your own then ask questions when you get stuck and can show what you have already tried.

1 solution

You want to use the DirectoryInfo.GetFiles() method. Goole is your friend.
 
Share this answer
 

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