Hi englishsteve,
Please try the example below
- <%@ Page Language="c#" AutoEventWireup="false" %>
-
- <%@ Register TagPrefix="DotNetGallery" Namespace="DotNetGallery" Assembly="DotNetGallery" %>
-
- <script runat="server">
-
- protected override void OnInit(EventArgs e)
- {
- base.OnInit(e);
-
- GalleryBrowser1.Layout = "SlideShow";
- GalleryBrowser1.AllowEdit = true;
- GalleryBrowser1.AllowPostComment = true;
- GalleryBrowser1.AllowShowComment = true;
- using (DotNetGallery.GalleryDataProvider provider = DotNetGallery.GalleryDataProvider.CreateInstance(Context, "~/GalleryFiles/"))
- {
- string[] categoryArray = provider.GetCategoryArray();
- for (int i = 0; i < categoryArray.Length; i++)
- {
- string title;
- string description;
- string properties;
- string physicalPath = provider.PhysicalDirectory;
- string virtualPath = provider.VirtualDirectory;
- ListItem l1 = new ListItem();
- ddlCategoryID.Items.Add(l1);
- if (provider.GetCategoryInfo(categoryArray[i].ToString(), out title, out description, out properties))
- {
- l1.Text = categoryArray[i][0].ToString();
- l1.Value = title;
- }
-
- }
-
- }
- }
- </script>
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>SlideShow Layout - DotNetGallery</title>
- <link href="Sample.css" type="text/css" rel="stylesheet" />
- </head>
- <body>
- <form id="form1" runat="server">
- <a href="#" onclick="thegallerybrowser.ShowEditor();return false;">Admin Console</a>
- <asp:DropDownList ID="ddlCategoryID" runat="server">
- </asp:DropDownList>
- <DotNetGallery:GalleryBrowser runat="server" ID="GalleryBrowser1" Width="720" Height="400" />
- </form>
- </body>
- </html>
Regards,
ken