CREATE TABLE [dbo].[Groups] (
[Group_Id] INT IDENTITY (1, 1) NOT NULL,
[Group_Name] NVARCHAR (50) NULL,
[Group_Desc] NVARCHAR (MAX) NULL,
CONSTRAINT [Groups.Group_Id.PrimaryKey] PRIMARY KEY CLUSTERED ([Group_Id] ASC) );
CREATE TABLE [dbo].[Group_Images] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[Group_Id] INT NOT NULL, [filename] VARCHAR (250) NULL,
[imageDesc] NVARCHAR (250) NULL,
CONSTRAINT [Group_Images.ID.Primary Key] PRIMARY KEY CLUSTERED ([ID] ASC),
CONSTRAINT [Group_Images.to.Groups] FOREIGN KEY ([Group_Id]) REFERENCES [dbo].[Groups]
([Group_Id]) );
CREATE TABLE [dbo].[Photo_Collection] ( [Id] INT IDENTITY (1, 1) NOT NULL,
[Group_Id] INT NOT NULL,
[Name] NVARCHAR (250) NULL,
CONSTRAINT [Photo_Collection.Id.PrimaryKey] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [Photo_Collection.to.Groups] FOREIGN KEY ([Group_Id]) REFERENCES
[dbo].[Groups] ([Group_Id]) );
CREATE TABLE [dbo].[Photo_Collection_Images] (
[Photo_Collection_Id] INT NOT NULL,
[Group_Image_Id] INT NOT NULL,
CONSTRAINT [Photo_Collection_Images.to.Photo_Collection] FOREIGN KEY ([Photo_Collection_Id]) REFERENCES [dbo].[Photo_Collection] ([Id]), CONSTRAINT [Photo_Collection_Images.to.Group_Images] FOREIGN KEY ([Group_Image_Id]) REFERENCES [dbo].[Group_Images] ([ID]) );
<h4>Group Photo Albums:</h4>
<asp:Label ID="lbl97" runat="server">Group:</asp:Label>
<table>
<tr>
<td align="right">
<asp:Label runat="server">Group:</asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlGroupName" runat="server" AutoPostBack-="True"
DataTextField="Group_Name" DataValueField="Group_Id" AppendDataBoundItems="true"
OnSelectedIndexChanged="ddlGroupName_SelectedIndexChanged">
<asp:ListItem Value="0">Select Group</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:Label runat="server" Text="Photo Album:"></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlPhotoAlbum" runat="server" AppendDataBoundItems="true" DataTextField="Name"
DataValueField="Id" AutoPostBack="true"
OnSelectedIndexChanged="ddlPhotoAlbum_SelectedIndexChanged">
<asp:ListItem Value="0">Select Album</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
Can any of you guys tell me how to display images which are associated with the Photo Album selected in ddlPhotoAlbum?