<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test_cache_sql_2005.aspx.cs" Inherits="test_cache_sql_2005" %>
<%@ OutputCache Duration="45" SqlDependency="CommandNotification" VaryByParam="none" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Dépendance SQL 2005</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id_agence"
            DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="id_agence" HeaderText="id_agence" InsertVisible="False"
                    ReadOnly="True" SortExpression="id_agence" />
                <asp:BoundField DataField="nom_agence" HeaderText="nom_agence" SortExpression="nom_agence" />
            </Columns>
        </asp:GridView>
        &nbsp;<br />
        <asp:Button ID="Button1" runat="server" Text="Recharger" /><br />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:bancaConnectionString %>"
            EnableCaching="True" 
            OnSelecting="SqlDataSource1_Selecting" 
            SelectCommand="SELECT id_agence,nom_agence FROM dbo.agence"
            ></asp:SqlDataSource>
    SqlCacheDependency="CommandNotification"
    </div>
    </form>
</body>
</html>
