Click here for an image example
Each action is captured by events and public properties for you to manipulate. [For example, I used it for a photos thumbnail browser].
Property | Assignment Type | Default Value | Comments |
rPath | String | "\" | The relative path of the path to be browsed. |
TablesWidth | String | "48%" | The width of the boxes (can be integer or string such as "50%"). |
TablesStyleClass | String | "defaulttext" | The string that is put in the "class" tag of each box. (usually for fontsizes and such). |
ImgsPath | String | "/Images/Menu/" | The path where the icons are stored (for the file and the dir icons). |
MaxSubDirs | Integer | 50 | The maximum number of sub-directories that can exist to show. |
MaxFiles | Integer | 300 | The maximum number of files that can exist to show. |
UseFileViewer | Boolean | True | Whether the files are showed when a directory is selected to view. |
DirDisplayed | String | The virtual path of the directory that is shown. | |
DirToView | String | The virtual path of the directory for which the View Link is clicked. | |
FileToView | String | The virtual path of the file that was selected. |
Method | Comments |
LoadNewDir(Object, EventArgs.empty) | Load up a new directory path. The path is taken from the Object's CommandArgument (so the object could be a LinkButton instance). |
Event | Comments |
OnDirChange | When the directory shown is changed. DirDisplayed is also changed. |
OnViewClicked | When the View link is clicked. The DirToView is also changed |
OnFileClicked | When a file is clicked. The FileToView is also changed |
<TP:GalleryDir runat="server" [rPath="Path String"] [TablesWidth=Width String] [TablesStyleClass=CSS class string]
[ImgsPath=Path String] [MaxSubDirs=Integer] [MaxFiles=Integer] [UseFileViewer=Boolean]
[OnDirChange=Sub for event] [OnViewClicked=Sub for event] [OnFileClicked=Sub for event]
> </TP:GalleryDir>
The brackets [ ] are used to show the optional. Italics are used to show the text you need to type according to your preferences.
e.g. <TP:GalleryDir runat="server" rPath="\Images\Photos" ID="GalleryDirs" TablesWidth="100%" OnFileClicked="RefreshThumbnail"> </TP:GalleryDir>
Also, certain asp.net errors have been noted with this control. Anyone interested to fix this bug is welcome (because it works well on my PC).