aspnet-devexpress-dot-web-dot-imagegalleryfoldersettings-9f11bae0.md
Gets or sets the path to the folder that contains cached images.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue("")]
public string ImageCacheFolder { get; set; }
<DefaultValue("")>
Public Property ImageCacheFolder As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A string value specifying the path to the folder.
|
You can access this nested property as listed below:
| Object Type | Path to ImageCacheFolder |
|---|---|
| ASPxImageGallery |
.SettingsFolder .ImageCacheFolder
|
When the ImageGalleryFolderSettings.ImageSourceFolder property is specified, the ASPxImageGallery caches the images from the source folder to the folder specified via the ImageCacheFolder property.
Note
By default, images are cached to the public “ *~\Thumb* “ folder that can result in unauthorized access to private files, therefore we recommend you set restricted access for this folder.
<dx:ASPxComboBox ID="cbSelectFolder" runat="server" AutoPostBack="True" SelectedIndex="0" Caption="Select Folder">
<Items>
<dx:ListEditItem Text="Landscapes" Value="~\Content\Images\landscapes\" />
<dx:ListEditItem Text="People" Value="~\Content\Images\people\" />
<dx:ListEditItem Text="Photo Gallery" Value="~\Content\Images\photo_gallery\" />
</Items>
</dx:ASPxComboBox>
<dx:ASPxImageGallery ID="imageGallery" runat="server" Width="100%" />
protected void Page_Load(object sender, EventArgs e) {
imageGallery.SettingsFolder.ImageSourceFolder = cbSelectFolder.Value.ToString();
imageGallery.SettingsFolder.ImageCacheFolder = "~\Thumb\ImageGalleryThumb\";
}
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
imageGallery.SettingsFolder.ImageSourceFolder = cbSelectFolder.Value.ToString()
imageGallery.SettingsFolder.ImageCacheFolder = "~\Thumb\ImageGalleryThumb\")
End Sub
For a full example, see Image Gallery - Folder Binding demo.
See Also
ImageGalleryFolderSettings Class