
More than 2 years ago I wrote this article and submitted it in CodeProject detailing how you can build a FileSystem Browser in ASP.NET. The article talks about how newbie ASP developers moving to ASP.NET might code the solution and how somebody a little bit more familiar with ASP.NET would build the same application in lesser code.
Somebody emailed me about my article yesterday asking for some guidance. This lead me to inspect my old article. The first thing i said to myself after seeing my old code is 'Yikes! I did that?'. Yup, it was that horrible. The solution works, its functional based on the need but I knew i could clean it up and code it much better if i had the chance to do it a second time around. That chance happened today.
I haved changed the way i read folders(before it was using query strings). I have replaced that logic by placing the path inside my LinkButton CommandArgument property. How i pass the FileSystemInfo[] to the grid(it was using an intermediate datatable) and the type of control that displays the data(it was using a datagrid before now we are using a gridview). I've also added a breadcrumb like control to track the users location and made it a little bit prettier by adding icons instead of plain text descriptions.
I'll be updating this constantly based on the request I haved received from my original article. The most common request is sorting which I will add on the next release.
Hopefully this version is less crappier than the last.
*Update*
Thanks to Andreas Haydeck for pointing out a bug in the BuildNavigatorPath method that causes the navigator path not to show the proper folder location. This has been fixed and the code in this article has been updated.
Download the latest source here: KeithRull.FileSystemManagerRevisited.zip (6.57 KB)
Posted
Nov 16 2007, 03:54 PM
by
keithrull