<%@ Page Title="All Photo Albums" Language="
VB" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.
vb" Inherits="_Default" %>
<script runat="server">
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
</asp:UpdatePanel>
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedInde xChanged">
</asp:DropDownList>
<asp:ListView ID="ListView1" runat="server" DataKeyNames="Id"
DataSourceID="LinqDataSource1">
<ItemTemplate>
<li> <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("ImageUrl") %>'
ToolTip='<%# Eval("ToolTip") %>' />
<asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>' />
</li>
</ItemTemplate>
<EmptyDataTemplate>
No data was returned.
</EmptyDataTemplate>
<LayoutTemplate>
<ul class="itemContainer">
<li ID="itemPlaceholder" runat="server" />
</ul>
<div style="">
<asp:DataPager ID="DataPager1" runat="server" PageSize="3">
<Fields>
<asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowLastPageButton="True" />
</Fields>
</asp:DataPager>
</div>
</LayoutTemplate>
</asp:ListView>
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
ContextTypeName="PlanetWroxDataContext" TableName="Pictures"
Where="PhotoAlbumId == @PhotoAlbumId">
<WhereParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="PhotoAlbumId"
PropertyName="SelectedValue" Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>
</asp:ContentTemplate>
</asp:UpdatePanel>
</asp:Content>