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

<!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></title>
    <style type="text/css">
        #form1
        {
            height: 25px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    <asp:Button ID="tableCmd" runat="server" Font-Bold="True" Font-Size="12pt" 
        onclick="tableCmd_Click" 
        style="top: 116px; left: 283px; position: absolute; height: 26px; width: 146px" 
        Text="Create Table" />
    <p>
        <asp:Button ID="databaseCmd" runat="server" Font-Bold="True" Font-Size="12pt" 
            onclick="databaseCmd_Click" 
            style="top: 57px; left: 281px; position: absolute; height: 29px; width: 143px" 
            Text="Create Database" />
        <asp:Button ID="insertCmd" runat="server" Font-Bold="True" Font-Size="12pt" 
            onclick="insertCmd_Click" 
            style="top: 176px; left: 288px; position: absolute; height: 29px; width: 124px" 
            Text="Insert Data" />
        <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="12pt" 
            style="top: 241px; left: 303px; position: absolute; height: 19px; width: 77px" 
            Text="Label"></asp:Label>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:productConnectionString %>" 
            InsertCommand="INSERT INTO books(isbn, picUrl, title, details, price) VALUES (@isbn, @picUrl, @title, @details, @price)" 
            SelectCommand="SELECT * FROM [books]"></asp:SqlDataSource>
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
            DataSourceID="SqlDataSource1" DefaultMode="Insert" 
            style="top: 114px; left: 30px; position: absolute; height: 98px" 
            Visible="False" Width="125px">
            <Fields>
                <asp:BoundField DataField="isbn" HeaderText="isbn" SortExpression="isbn" />
                <asp:BoundField DataField="picUrl" HeaderText="picUrl" 
                    SortExpression="picUrl" />
                <asp:BoundField DataField="title" HeaderText="title" SortExpression="title" />
                <asp:BoundField DataField="details" HeaderText="details" 
                    SortExpression="details" />
                <asp:BoundField DataField="price" HeaderText="price" SortExpression="price" />
                <asp:CommandField ShowInsertButton="True" />
            </Fields>
        </asp:DetailsView>
    </p>
    </form>
</body>
</html>
