<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ArtistsCached.aspx.cs" Inherits="MyTunes.CachedDataset.ArtistsCached" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <asp:Label ID="lblDebug" runat="server" 
            Text="Cached Dataset Example - Artists with Default Paging and Sorting" 
            style="font-weight: 700; color: #FF0000"></asp:Label>
    </div>
    <div class="quickLinks">
        <asp:Label ID="lblQuickLinks" runat="server"></asp:Label>
    </div>
    <div class="pageSelect">
        <table style="width: 100%;">
            <tr>
                <td style="text-align: left">
                    <asp:Label ID="lblArtistCachedFilter" runat="server" Text="Artist Quick Search:"></asp:Label>
                    <asp:TextBox ID="txtArtistCachedFilter" runat="server" 
                        ontextchanged="txtArtistCachedFilter_TextChanged"></asp:TextBox>
                    <asp:ImageButton ID="btnArtistCachedFilterGo" runat="server" 
                        ImageUrl="~/App_Themes/Default/Images/rarrow.gif" 
                        onclick="btnArtistCachedFilterGo_Click" />
                </td>
                <td style="text-align: center">
                    <asp:Label ID="lblCachedPageInfo" runat="server" style="font-style: italic"></asp:Label>
                </td>
                <td style="text-align: right">
                    &nbsp;
                    <asp:Label ID="lblPageSelectCached" runat="server" Text="Jump to:"></asp:Label>
                    <asp:DropDownList ID="lstPageSelectCached" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="lstPageSelectCached_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="ArtistCachedGridView" runat="server" AllowPaging="True" 
        AllowSorting="True" DataSourceID="ArtistCachedDataSource" PageSize="25" 
        ondatabound="ArtistCachedGridView_DataBound" 
    AutoGenerateColumns="False" DataKeyNames="artist_id">
        <Columns>
            <asp:BoundField DataField="artist_id" HeaderText="artist_id" ReadOnly="True" 
                SortExpression="artist_id" Visible="False" />
            <asp:BoundField DataField="artist" HeaderText="Artist" 
                SortExpression="artist" />
            <asp:BoundField DataField="NumAlbums" HeaderText="Number of Albums" 
                ReadOnly="True" SortExpression="NumAlbums">
            <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="NumSongs" HeaderText="Number of Songs" 
                ReadOnly="True" SortExpression="NumSongs">
            <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
        </Columns>
        <PagerSettings Mode="NumericFirstLast" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ArtistCachedDataSource" runat="server" 
    OldValuesParameterFormatString="original_{0}" SelectMethod="GetArtists" 
    TypeName="MyTunes.Common.Cached.ArtistCachedBLL"></asp:ObjectDataSource>
</asp:Content>
