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

<%@ Register Src="Controls/AmazonBookControl.ascx" TagName="AmazonBookControl" TagPrefix="uc" %>

<%@ Register Src="Controls/ShowWeatherControl.ascx" TagName="ShowWeatherControl"
   TagPrefix="uc" %>

<!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>Testowanie kontrolki z usługą web</title>
	<link href="chapterStyles.css" type="text/css" rel="stylesheet" />
</head>
<body>
	<form id="form1" runat="server">
		<div id="container">
			<h1>Testowanie kontrolki z usługą web</h1>
			<p>
			Strona demonstruje hermetyzację usług web w kontrolkach użytkownika.
			</p>  
         <div id="sideArea">
			   <uc:ShowWeatherControl ID="myWeather" runat="server" />			         
			   <uc:AmazonBookControl ID="myBook" runat="server" ISBN="0131472275"  />
         </div>
         <div id="mainArea">
            <div class="box">
               <div id="bookListBox">
                  <h2>Książki w bazie danych</h2>
                  <asp:GridView ID="grdBookList" runat="server" DataSourceID="dsBooks"
                    AutoGenerateColumns="False"
                    AllowPaging="false" PageSize="4"
                    DataKeyNames="Isbn" GridLines="None"
                    Width="30em"
                    CellPadding="4" ShowHeader="false"
                    OnSelectedIndexChanged="grdBookList_SelectedIndexChanged">

                     <Columns>
                        <asp:CommandField ShowSelectButton="true" ButtonType="Image"
                           SelectImageUrl="images/btn_select.gif"/>             
                        <asp:BoundField DataField="Title" />           
                     </Columns>
                  </asp:GridView> 
               </div> 
            </div> 
         </div>
         <div id="footer">
            <p><asp:Label ID="labFooter" runat="server" /></p>
         </div>
	   </div>
		<asp:SqlDataSource ID="dsBooks" runat="server"
	    ProviderName="System.Data.SqlClient"  
	    ConnectionString="<%$ ConnectionStrings:BookCatalog %>"
	    SelectCommand="SELECT ISBN,Title FROM Books" />
	</form>
</body>
</html>
