Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.net + ajax + directory file reader

Status
Not open for further replies.

fmrock

Programmer
Sep 5, 2006
510
US
Hey everyone,

I am new to asp.net and ajax. I have been programming for a while using classic ASP and VB.

I have a directory that has a bunch of pdf reports

The directory structure is has a year folder / month folder/ week folder

/2008/

/2008/01-2008/

/2008/01-2008/01-06-2008
/2008/01-2008/01-06-2008/Location_1.pdf
/2008/01-2008/01-06-2008/Location_2.pdf
/2008/01-2008/01-06-2008/Location_3.pdf
/2008/01-2008/01-06-2008/Location_4.pdf


And so on for each week of the month.

/2008/01-2008/01-13-2008
/2008/01-2008/01-20-2008
/2008/01-2008/01-27-2008

I would like to build a page that uses asp.net and possibly ajax, but was wondering if anyone knew of any exaples out there that could point me in the right direction.


 
Maybe a set of select boxes, one for year, month, and week. The Month select would populate based on what year was selected, and so on. Once all 3 are filled out, it could populate the page with a list of links to the PDF file
 
1st you need to load the locations into a collection.
using System.IO you can use the DirectoryInfo object to get the directories and files.

from there you can build up a series of objects representing the directory (friendly name, full path, associated files, associatied directories).

this can all be done without any references to asp.net

once you have this collection you need to display it. this can be done using usercontrols and nested repeaters. this is easier than converting POCOs to a hierarchical datasource control

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Thanks. I will google and see what i can find on the DirectoryInfo object.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top