<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DataSourceControls.aspx.vb" Inherits="DataSourceControls" %>

<!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>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:DropDownList ID="lstName" runat="server" DataSourceID="SqlDataSource1" DataTextField="ProductName">
        </asp:DropDownList><br />
        <br />
        <table>
            <tr>
                <td style="width: 281px" valign="top">
                    <asp:CheckBoxList ID="lstQuantity" runat="server" Font-Names="Verdana" Font-Size="X-Small" DataSourceID="SqlDataSource1" DataTextField="QuantityPerUnit">
                    </asp:CheckBoxList>
                </td>
                <td valign="top">
                    <asp:GridView ID="gridDB" runat="server" Font-Names="Verdana" Font-Size="X-Small" AutoGenerateColumns="False" DataKeyNames="ProductID" DataSourceID="SqlDataSource1">
                        <Columns>
                            <asp:BoundField DataField="ProductID" HeaderText="ProductID" InsertVisible="False"
                                ReadOnly="True" SortExpression="ProductID" />
                            <asp:BoundField DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" />
                            <asp:BoundField DataField="QuantityPerUnit" HeaderText="QuantityPerUnit" SortExpression="QuantityPerUnit" />
                            <asp:BoundField DataField="UnitPrice" HeaderText="UnitPrice" SortExpression="UnitPrice" />
                            <asp:BoundField DataField="UnitsInStock" HeaderText="UnitsInStock" SortExpression="UnitsInStock" />
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
        </table>
    
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        SelectCommand="SELECT ProductID, ProductName, QuantityPerUnit, UnitPrice, UnitsInStock FROM Products"
          ConnectionString="<%$ ConnectionStrings:Northwind %>"
         >
        </asp:SqlDataSource>
    </div>
    
    </form>
</body>
</html>
