Slapping Together a Photo Gallery in ASP.NET Part II
(Page 1 of 7 )
In the first part of this two-part series, I initiated the task of building my "Photo Gallery" by talking about the Directory() and DirectoryInfo() objects. Today, I'll take this exercise to its logical conclusion by introducing their counterparts, i.e. the File() and FileInfo() objects, and developing an ASP.NET script that uses all of these .NET objects to display my photo collection.
By now, I'm pretty sure that you've recovered from the dreaded "back-to-work-from-a-vacation" syndrome and are eager to test run the "Photo Gallery" application that I promised to put together in the last article.
Well, not so fast!
First, let me quickly review the topics covered earlier: I began the article with an outline of the folder structure required for my "Photo Gallery" application. Then, I introduced the Directory() and DirectoryInfo() objects, which allow you to traverse folders on the server. But that was only half of the story.
Today, I hope to complete the picture by demonstrating the capabilities of the File() and the FileInfo() objects, followed by the grand finale - the ASP.NET script that implements my simple, no-frills "Photo Gallery" application.
A little note before I proceed: if you are looking for a tutorial on reading files or even creating new ones, I'd suggest that you look elsewhere. To be frank, these topics are vast and deserve to be treated as a separate point of discussion.
Enough said, it's time - as they say - to walk the walk!
Next: Working with Files >>
More ASP.NET Articles
More By Harish Kamath