<%@ Page Title="" Language="C#" MasterPageFile="~/BSoylu.master" AutoEventWireup="true" CodeFile="AnasayfayaEkle.aspx.cs" Inherits="Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:FormView ID="FormView1" runat="server" DataKeyNames="ID" 
        DataSourceID="AccessDataSource1" DefaultMode="Insert" 
        EnableModelValidation="True">
        <EditItemTemplate>
            ID:
            <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            Baslik:
            <asp:TextBox ID="BaslikTextBox" runat="server" Text='<%# Bind("Baslik") %>' />
            <br />
            Icerik:
            <asp:TextBox ID="IcerikTextBox" runat="server" Text='<%# Bind("Icerik") %>' />
            <br />
            Tarih:
            <asp:TextBox ID="TarihTextBox" runat="server" Text='<%# Bind("Tarih") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                CommandName="Update" Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <InsertItemTemplate>
            Baslik:
            <asp:TextBox ID="BaslikTextBox" runat="server" Text='<%# Bind("Baslik") %>' />
            <br />
            Icerik:
            <asp:TextBox ID="IcerikTextBox" runat="server" Text='<%# Bind("Icerik") %>' />
            <br />
           
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                CommandName="Insert" Text="EKLE" />
           
        </InsertItemTemplate>
        <ItemTemplate>
            ID:
            <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            Baslik:
            <asp:Label ID="BaslikLabel" runat="server" Text='<%# Bind("Baslik") %>' />
            <br />
            Icerik:
            <asp:Label ID="IcerikLabel" runat="server" Text='<%# Bind("Icerik") %>' />
            <br />
            Tarih:
            <asp:Label ID="TarihLabel" runat="server" Text='<%# Bind("Tarih") %>' />
            <br />
            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
                CommandName="Edit" Text="Edit" />
            &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
                CommandName="Delete" Text="Delete" />
            &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                CommandName="New" Text="New" />
        </ItemTemplate>
    </asp:FormView>
    <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
        ConflictDetection="CompareAllValues" DataFile="~/App_Data/BSoylu.mdb" 
        DeleteCommand="DELETE FROM [Anasayfa] WHERE [ID] = ? AND (([Baslik] = ?) OR ([Baslik] IS NULL AND ? IS NULL)) AND (([Icerik] = ?) OR ([Icerik] IS NULL AND ? IS NULL)) AND (([Tarih] = ?) OR ([Tarih] IS NULL AND ? IS NULL))" 
        InsertCommand="INSERT INTO [Anasayfa] ([Baslik], [Icerik]) VALUES (?, ?)" 
        OldValuesParameterFormatString="original_{0}" 
        SelectCommand="SELECT * FROM [Anasayfa]" 
        UpdateCommand="UPDATE [Anasayfa] SET [Baslik] = ?, [Icerik] = ?, [Tarih] = ? WHERE [ID] = ? AND (([Baslik] = ?) OR ([Baslik] IS NULL AND ? IS NULL)) AND (([Icerik] = ?) OR ([Icerik] IS NULL AND ? IS NULL)) AND (([Tarih] = ?) OR ([Tarih] IS NULL AND ? IS NULL))">
        <DeleteParameters>
            <asp:Parameter Name="original_ID" Type="Int32" />
            <asp:Parameter Name="original_Baslik" Type="String" />
            <asp:Parameter Name="original_Baslik" Type="String" />
            <asp:Parameter Name="original_Icerik" Type="String" />
            <asp:Parameter Name="original_Icerik" Type="String" />
            <asp:Parameter Name="original_Tarih" Type="String" />
            <asp:Parameter Name="original_Tarih" Type="String" />
        </DeleteParameters>
        <InsertParameters>
           
            <asp:Parameter Name="Baslik" Type="String" />
            <asp:Parameter Name="Icerik" Type="String" />
           
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Baslik" Type="String" />
            <asp:Parameter Name="Icerik" Type="String" />
            <asp:Parameter Name="Tarih" Type="String" />
            <asp:Parameter Name="original_ID" Type="Int32" />
            <asp:Parameter Name="original_Baslik" Type="String" />
            <asp:Parameter Name="original_Baslik" Type="String" />
            <asp:Parameter Name="original_Icerik" Type="String" />
            <asp:Parameter Name="original_Icerik" Type="String" />
            <asp:Parameter Name="original_Tarih" Type="String" />
            <asp:Parameter Name="original_Tarih" Type="String" />
        </UpdateParameters>
    </asp:AccessDataSource>

</asp:Content>

