Hi there,
Kentic version: v7.0.58
I have an aspx page with the ~/CMSWebParts/MediaLibrary/MediaGallery.ascx user control loaded. If I set the MediaLibraryName via the declarative code it works as expected. However as soon as I try to set it in the code behind then no content is displayed.
Here is the declarative code:
<%@ Register Src="~/CMSWebParts/MediaLibrary/MediaGallery.ascx" TagName="MediaFileGallery" TagPrefix="cmsBI" %>
<cmsBI:MediaFileGallery ID="FileBrowserMediaGallery" runat="server"
ShowSubfoldersContent="false"
DisplayFileCount="true"
DisplayActiveContent="false"
HideFolderTree="false"
UseSecureLinks="false"
AllowUpload="true"
AllowUploadPreview="false"
TransformationName="BI.Transformations.MediaLibrary"
FilterMethod="0"
SortQueryStringKey="sort"
FileIDQueryStringKey="fileid"
PathQueryStringKey="path"
PageSize="5"
QueryStringKey="page"
GroupSize="10"
DisplayFirstLastAutomatically="true"
DisplayPreviousNextAutomatically="true"
HidePagerForSinglePage="false"
OutputResolveURLs="true"
OutputFixAttributes="true"
OutputFixJavascript="true"
OutputFixLowerCase="true"
OutputFixTags="true"
OutputFixHTML5="true" />
and the code in Page_Load (tried several other page events as well) is:
EnsureChildControls();
FileBrowserMediaGallery.MediaLibraryName = KeyValue;
FileBrowserMediaGallery.SetValue("MediaLibraryName", KeyValue);
FileBrowserMediaGallery.ReloadData();
Any ideas what I am missing?
Lucy