Re: How to display the title from the category.config file in the album.config file

  •  02-01-2010, 3:22 AM

    Re: How to display the title from the category.config file in the album.config file

    Hi beth123,
     
    Try this example
     
    1. <%@ Page Language="C#" %>   
    2. <%@ Register TagPrefix="DotNetGallery" Namespace="DotNetGallery" Assembly="DotNetGallery" %>   
    3. <script runat="server">   
    4.     void Page_Load(object sender, EventArgs e)   
    5.     {   
    6.         using (DotNetGallery.GalleryDataProvider provider = DotNetGallery.GalleryDataProvider.CreateInstance(Context, "~/GalleryFiles/"))   
    7.         {   
    8.             //get all category   
    9.             string[] categoryArray = provider.GetCategoryArray();   
    10.             for (int i = 0; i < categoryArray.Length; i++)   
    11.             {   
    12.                 string title;   
    13.                 string description;   
    14.                 string properties;   
    15.                 if (provider.GetCategoryInfo(categoryArray[i].ToString(), out title, out description, out properties))   
    16.                 {   
    17.                     //show all title in label1   
    18.                     label1.Text += title;   
    19.                 }   
    20.             }   
    21.         }   
    22.     }   
    23.     
    24. </script>   
    25.   
    26. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">   
    27. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">   
    28. <head runat="server">   
    29.     <title></title>   
    30. </head>   
    31. <body>   
    32.     <form id="form1" runat="server">   
    33.         <asp:Label ID="label1" runat="server"></asp:Label>   
    34.         <DotNetGallery:GalleryBrowser runat="server" ID="gallery1" Width="720" Height="430" />   
    35.     </form>   
    36. </body>   
    37. </html>  
    Regards,
     
    Ken
View Complete Thread