Pentabyte Gallery

Pentabyte Gallery


The Image Gallery is a full-featured ASP.NET server control to browse file-based picture-albums. You can place it within one of your existing ASP pages. Since it has the nature of a server control, you could even place two galleries on one page. Each of them can be browsed independently.
Development has been discontinued. Please check out the source code yourself. Feel free to modify and use it.


Download:Pentabyte.WebControls v1.08 44kB (freeware) - sources
terms and conditions of use

copyright registered on

Main features:

  • ASP.NET 2.0 server control
  • file system based
  • thumbnail caching strategy
  • custom css styling
  • quick Navigation in popup-window
  • supports alpha-channel (transparent) watermark image
  • image order form for commercial purposes available (attribut: EnableOrderForm)
  • popup window generates an image that adapts to the window
  • supported picture file formats: JPG, TIFF, BMP, GIF, PNG
  • text based navigation -> apply your own css design


(1) Copy "Pentabyte.WebControls.dll" into the "Bin" - directory of your ASP.NET 2.0 web application. Create the "Bin" - directory first, in case it does not exist yet

(2) Add ThumbHandler to your web.config file:

<add verb="GET" path="Pentabyte.WebControls.ThumbHandler.aspx" type="Pentabyte.WebControls.ThumbHandler"/>

(3) Register the Class in your aspx - page:

<%@ Register Namespace="Pentabyte.WebControls" TagPrefix="Pentabyte" Assembly="Pentabyte.WebControls" %>

(4) Place gallery control to your aspx - page. Needs to be within the first FORM tag.

<form id="form1" runat="server">
<Pentabyte:Gallery id="MyGallery" runat="server" Columns="4" Rows="3" Paging="true" PopupWidth="1000" PopupHeight="800" Language="en"></Pentabyte:Gallery>

(5) Done ! Now create subdirectories and lots of pictures within the directory of your aspx - page. (or in whatever directory you like, just make sure to set the "RootDirectory" then)

Gallery Tag Attributes

Attribute type default description
AllowOriginal boolean true allows the display of a link to the original image
Columns integer 4 maximum of thumbnails in one row
EnableOrderForm boolean false Adds a contact/order form to the detail view of each image (SMTP atttributes must be set)
FolderStyleClass string "" css style for the directories relates to <table> html tag
ExcludeDirectories string ""

defines forbidden directory names in addition to:
separator: "|" pipe
wildcard: "*" astarisk

in case you don't want any subdirectories at all, set property to *

Language enumeration en en, de, fr, nl
LicenceKey String "" leave empty for freeware version
a licenced control will not diplay any copyright information
OrderBy String Name Name : File Name
Created : date of creation
Paging boolean true if false, then all thumbnails are displayed on one page
PopupWidth integer 800 bounding box of picture dimensions
PopupHeight integer 600
PopupScaling boolean true If you don't care about the popup-image fitting the popup window, then set this to false. As to your advantage, no scaling will affect the image quality.
ReverseOrder boolean false display files in reverse order ? see also: OrderBy
RootDirectory string "." defaults to the current script-directory. can be set to a relative path on the webserver or to an absolute path in the file-system (interesting in combination with a watermark-image to hide the original images from the internet user)
Rows integer 4 maximum of thumbnails in one column
SMTPhost string "" IP or hostname of mail server
SMTPuser string "" e-mail account username
SMTPpassword string "" e-mail account password
SMTPrecipient string "" e-mail address requests / orders will be sent to
TableStyleClass string "" css style for the gallery relates to <table> html tag
ThumbnailStyleClass string "" css style for the images relates to <img> html tag
ThumbnailWidth integer 125 bounding box of thumbnail dimensions
ThumbnailHeight integer 125
WatermarkImage string "" name of transparent image file in the RootDirectory that overlays the popup image (32bit PNG recommended)
ZoomToFit boolean true should small pictures be zoomed in popup-window ?