Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
ASP.Net Image Gallery
»
Re: How to display the title from the category.config file in the album.config file
Re: How to display the title from the category.config file in the album.config file
02-01-2010, 3:22 AM
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: How to display the title from the category.config file in the album.config file
Reply
Quote
Hi beth123,
Try this example
<%@ Page Language=
"C#"
%>
<%@ Register TagPrefix=
"DotNetGallery"
Namespace=
"DotNetGallery"
Assembly=
"DotNetGallery"
%>
<script runat=
"server"
>
void
Page_Load(
object
sender, EventArgs e)
{
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))
{
//show all title in label1
label1.Text += 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 runat=
"server"
>
<title></title>
</head>
<body>
<form id=
"form1"
runat=
"server"
>
<asp:Label ID=
"label1"
runat=
"server"
></asp:Label>
<DotNetGallery:GalleryBrowser runat=
"server"
ID=
"gallery1"
Width=
"720"
Height=
"430"
/>
</form>
</body>
</html>
Regards,
Ken
View Complete Thread