Re: How to display only certain categories / + ability to list available categories

  •  08-03-2011, 7:14 AM

    Re: How to display only certain categories / + ability to list available categories

    Hi rmw82,
     
    Please try 
     
    using (DotNetGallery.GalleryDataProvider provider = DotNetGallery.GalleryDataProvider.CreateInstance(Context, "~/GalleryFiles/"))
            {
                //get all category
                string[] categoryArray = provider.GetCategoryArray();
                for (int i = 0; i < categoryArray.Length; i++)
                {
                    string title;
                    string description;
                    string properties;
                    
                    if (provider.GetCategoryInfo(categoryArray[i].ToString(), out title, out description, out properties))
                    {
                        //title is the name of the category
                        label1.Text += title;
                    }
                }
            }
     
     
    Regards,
     
    ken
View Complete Thread