<%@ Page %>
FREE Web Site File Manager User Control (Ver.1.0)
Introduction
ASP.NET Custom user controls and web controls provide great amount of code reuse and flexibility. This FREE user control is a file manager for typical web sites. The download also includes a sample ASPX page ready to use in your applications. This is Ver.1.0 of the control. Based on user feedback and suggestions I will enhance it further. So don't forget to drop me a line at <% displaylink "bipinjoshi@yahoo.com","mailto:bipinjoshi@yahoo.com",true,false %>
Functionality in Ver 1.0
The current version provides following functionality :
- Folder creation
- Folder deletion
- Multiple File Deletion
- Multiple File Move (Cut/Paste)
- File Rename
- Single File Upload
Screen Shot
Click here to view screen shot
Known issues
Following are the known facts about the control :
- In case if deletion of folder fails no error message is displayed
- No warning is displayed while deleting files/folders
However, note that above is not a complete list. There can be other flaws present.
How to use the user control?
If you are using VS.NET then follow these steps in order to consume File Manager Control:
- Create a new ASP.NET project in VS.NET
- Add reference to sitefilemanager.dll
- Add sample.aspx and sitefilemanagercontrol.ascx to the project
- Make sure that in sitefilemanagercontrol.ascx you inherit from SiteFileManager.SiteFileManagerControl class.
- Set sample.aspx as default page
- Also, note that the user control uses two session variables of type string. You must enable session state for the web form (ASPX page).
- Run the application
If you are not using VS.NET and code-behind approach follow these steps:
- Copy sample.aspx to your virtual root
- Copy sitefilemanagercontrol.ascx to your virtual root
- Copy sitefilemanager.dll in the bin folder of your virtual root
- Make sure that in sitefilemanagercontrol.ascx you inherit from SiteFileManager.SiteFileManagerControl class.
- Also, note that the user control uses two session variables of type string. You must enable session state for the web form (ASPX page).
- Run the application
Further Enhancements
Following enhancements can be done :
- Mark folders marked for 'Cut' with different color
- Confirm file/folder delete
- Convert user control into web control (.dll rather than .ascx)
- Error message to be displayed in case folder deletion fails
So, go ahead and use this FREE control in your applications.
Download
The ZIP file contains :
- Sample.aspx : A ready to use web form that hosts the user control
- sitefilemanager.dll : Includes all the code needed to run the file manager
- sitefilemanagercontrol.ascx : User control file that contains various elements of the control.