Glossary Item Box
Editor and GalleryBox controls allows to use alternative Media Gallery instead of default Media Gallery.
The CustomGalleryAPI control represents API to create a custom gallery. You can use the API to get or return any custom media object from your custom gallery. This control help you to return media object from your custom gallery.
Client-side API functions list:
| Name | Description |
| ContentType | This variable contains content type to filter the content that is showed into the custom gallery. |
| returnMediaObject(filePath, width, height, additionalParams) | This function returns selected media object. In the Editor control you can use width, height and additionalParams parameters to define additional parameters. |
1. Create Editor or GalleryBox control on the page and define GalleryPath or CustomGalleryPath property by path t o your custom gallery:
<al:editor id="control1" runat="server" GalleryPath="gallery.aspx" GalleryWindowHeight="100px" GalleryWindowWidth="300px" />
or
<al:GalleryBox id="control1" runat="server" CustomGalleryPath="gallery.aspx" GalleryWindowHeight="100px" GalleryWindowWidth="300px" />
2. Create ASPX page with "gallery.aspx" name. See sample:
<%@ Page Language="C#" %> |
This code creates next gallery form:
When you click on any image from the gallery the image will invoke the selectImage function and return the media object into the control.
![]() |
Ensure that folder with the media objects exists. |
| See Also |
Controls: GalleryBox | Editor | Media Gallery