<%@ Page Language="C#" MasterPageFile="~/BlogerMasterPage.master" AutoEventWireup="true" CodeFile="UpLoad.aspx.cs" Inherits="Bloger_BlogManage_UpLoad" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width: 566px; height: 242px">
        <tr>
            <td style="width: 81px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 81px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 81px">
                上传者</td>
            <td colspan="2">
                <asp:TextBox ID="TextBox1" runat="server" Enabled="False" Width="148px"></asp:TextBox></td>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 81px">
                文件描述</td>
            <td colspan="2">
                <asp:TextBox ID="TextBox2" runat="server" ValidationGroup="a"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox2"
                    ErrorMessage="*" ValidationGroup="a"></asp:RequiredFieldValidator></td>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 81px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 81px">
                &nbsp;资源地址</td>
            <td colspan="3">
                <asp:FileUpload ID="FileUpload1" runat="server" Width="274px" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="FileUpload1"
                    ErrorMessage="*" ValidationGroup="a"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 81px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="上传" ValidationGroup="a" /></td>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 81px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 81px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 81px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
            <td style="width: 100px">
            </td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DesertEagleConnectionString2 %>" DeleteCommand="DELETE FROM [DE_resource] WHERE [resource_id] = @original_resource_id AND [bloger_name] = @original_bloger_name AND [pub_date] = @original_pub_date AND [file_name] = @original_file_name AND [description] = @original_description"
        InsertCommand="INSERT INTO [DE_resource] ([bloger_name], [pub_date], [file_name], [description]) VALUES (@bloger_name, @pub_date, @file_name, @description)"
        OldValuesParameterFormatString="original_{0}" OnInserting="SqlDataSource1_Inserting"
        SelectCommand="SELECT * FROM [DE_resource]" UpdateCommand="UPDATE [DE_resource] SET [bloger_name] = @bloger_name, [pub_date] = @pub_date, [file_name] = @file_name, [description] = @description WHERE [resource_id] = @original_resource_id AND [bloger_name] = @original_bloger_name AND [pub_date] = @original_pub_date AND [file_name] = @original_file_name AND [description] = @original_description">
        <DeleteParameters>
            <asp:Parameter Name="original_resource_id" Type="Int32" />
            <asp:Parameter Name="original_bloger_name" Type="String" />
            <asp:Parameter Name="original_pub_date" Type="DateTime" />
            <asp:Parameter Name="original_file_name" Type="String" />
            <asp:Parameter Name="original_description" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="bloger_name" Type="String" />
            <asp:Parameter Name="pub_date" Type="DateTime" />
            <asp:Parameter Name="file_name" Type="String" />
            <asp:Parameter Name="description" Type="String" />
            <asp:Parameter Name="original_resource_id" Type="Int32" />
            <asp:Parameter Name="original_bloger_name" Type="String" />
            <asp:Parameter Name="original_pub_date" Type="DateTime" />
            <asp:Parameter Name="original_file_name" Type="String" />
            <asp:Parameter Name="original_description" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="bloger_name" Type="String" />
            <asp:Parameter Name="pub_date" Type="DateTime" />
            <asp:Parameter Name="file_name" Type="String" />
            <asp:Parameter Name="description" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
</asp:Content>

