<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test_linq.aspx.cs" Inherits="test_linq" %>

<!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>LinqDataSource + dbml</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <b>Une source de données LINQ basées sur un contexte relationnel créé par Visual Studio (*.dbml)</b>
        <asp:GridView ID="GridView1" runat="server" DataSourceID="linq_banca_compte" 
            AutoGenerateColumns="False" DataKeyNames="id_compte">
            <Columns>
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                <asp:BoundField DataField="id_compte" HeaderText="id_compte" 
                    InsertVisible="False" ReadOnly="True" SortExpression="id_compte" />
                <asp:BoundField DataField="titulaire" HeaderText="titulaire" 
                    SortExpression="titulaire" />
                <asp:BoundField DataField="solde" HeaderText="solde" SortExpression="solde" />
            </Columns>
        </asp:GridView>
        <asp:LinqDataSource ID="linq_banca_compte" runat="server" EntityTypeName="" 
            ContextTypeName="DataClassesBancaDataContext" EnableDelete="True" 
            EnableInsert="True" EnableUpdate="True" TableName="compte">
        </asp:LinqDataSource>
    
    </div>
    </form>
</body>
</html>
