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

<!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 id="Head1" runat="server">
   <title>Using Data Source Controls</title>
   <link href="chapterStyles.css" type="text/css" rel="stylesheet" />
</head>
<body>
   <form id="form1" runat="server">
      <div id="container">
         <h1>Using Data Source Controls</h1>
         <p>
         This example illustrates how to use two of the Data Source Controls
          -- the <code>AccessDataSource</code> and the <code>SqlDataSource</code>
         </p>
         <h2>Books</h2>
			<asp:GridView ID="grdBooks" runat="server" DataSourceID="adsBooks"/>
			<h2>Authors</h2>
			<asp:GridView ID="grdWorks" runat="server" DataSourceID="sdsArt"/>
			<p>
			<asp:DropDownList ID="drpAuthors" runat="server"
			  DataSourceID="adsBooks" DataTextField="AuthorName" />
         <asp:Label ID="labMsg" runat="server" />
         </p>
         <asp:AccessDataSource ID="adsBooks" runat="server" 
            SelectCommand="Select * from Authors" DataFile="App_Data/BookCatalogSystem.mdb"
         >
         </asp:AccessDataSource>
         <asp:SqlDataSource ID="sdsArt" runat="server"
             ProviderName="System.Data.SqlClient"
             ConnectionString="<%$ ConnectionStrings:ModernEye %>"
              SelectCommand="Select * From ArtWorks" />
      </div>
   </form>
</body>
</html>

