Click here to Skip to main content
12,826,151 members (30,248 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
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 26-Jan-11 20:31pm
Updated 26-Jan-11 23:58pm
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
digital man 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.
Sandeep Mewara 27-Jan-11 3:48am
and we want to see some effort from your side.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100