⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ggao.aspx

📁 计算机实验课在线答疑系统 09年毕业设计
💻 ASPX
字号:
<%@ Page Language="C#"  MasterPageFile="~/admin/adminMasterPage.master" AutoEventWireup="true" CodeFile="ggao.aspx.cs" Inherits="admin_ggao" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

        <table style="width: 773px; height: 470px">
            <tr>
                <td style="width: 412px">
                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSource1" Height="289px" Width="666px" CellPadding="1" ForeColor="#333333" GridLines="None">
            <Columns>
                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                    SortExpression="id" />
                <asp:BoundField DataField="title" HeaderText="标题" SortExpression="title" />
                <asp:BoundField DataField="time" HeaderText="时间" SortExpression="time" />
                <asp:ButtonField CommandName="Select" Text="详细&gt;&gt;&gt;" ButtonType="Button" />
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ButtonType="Button" />
            </Columns>
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Left" />
                        <EditRowStyle BackColor="#999999" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:GridView>
                </td>
                <td style="width: 251px" valign="top">
                    &nbsp;<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                        SelectCommand="SELECT [id], [content] FROM [ggao] WHERE ([id] = @id)" DeleteCommand="DELETE FROM [ggao] WHERE [id] = @id" InsertCommand="INSERT INTO [ggao] ([content]) VALUES (@content)" UpdateCommand="UPDATE [ggao] SET [content] = @content WHERE [id] = @id">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="GridView1" Name="id" PropertyName="SelectedValue"
                                Type="Int32" />
                        </SelectParameters>
                        <DeleteParameters>
                            <asp:Parameter Name="id" Type="Int32" />
                        </DeleteParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="content" Type="String" />
                            <asp:Parameter Name="id" Type="Int32" />
                        </UpdateParameters>
                        <InsertParameters>
                            <asp:Parameter Name="content" Type="String" />
                        </InsertParameters>
                    </asp:SqlDataSource>
                    <asp:DataList ID="DataList1" runat="server" DataKeyField="id" DataSourceID="SqlDataSource5"
                        Height="274px" Width="253px" CellPadding="4" ForeColor="#333333">
                        <ItemTemplate>
                            &nbsp;<asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' Visible="False"></asp:Label><br />
                            &nbsp;<asp:Label ID="contentLabel" runat="server" Text='<%# Eval("content") %>'></asp:Label><br />
                            <br />
                        </ItemTemplate>
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                        <ItemStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Left" />
                        <HeaderTemplate>
                            具体内容
                        </HeaderTemplate>
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    </asp:DataList><asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                        SelectCommand="SELECT [id], [content] FROM [ggao] WHERE ([id] = @id)">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="GridView1" Name="id" PropertyName="SelectedValue"
                                Type="Int32" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td style="width: 412px">
                <asp:FormView ID="FormView1" runat="server" DataKeyNames="id" DataSourceID="SqlDataSource2"
            DefaultMode="Insert" CellPadding="4" ForeColor="#333333" Height="157px" Width="482px">
            <EditItemTemplate>
                id:
                <asp:Label ID="idLabel1" runat="server" Text='<%# Eval("id") %>'></asp:Label><br />
                title:
                <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>'>
                </asp:TextBox><br />
                content:
                <asp:TextBox ID="contentTextBox" runat="server" Text='<%# Bind("content") %>'>
                </asp:TextBox><br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                    Text="更新">
                </asp:LinkButton>
                <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                    Text="取消">
                </asp:LinkButton>
            </EditItemTemplate>
            <InsertItemTemplate>
                标题:
                <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' Width="305px"></asp:TextBox><br />
                具体内容:
                <asp:TextBox ID="contentTextBox" runat="server" Text='<%# Bind("content") %>' TextMode="MultiLine" Height="137px" Width="264px"></asp:TextBox><br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                    Text="插入"></asp:LinkButton>
                <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                    Text="取消"></asp:LinkButton>
            </InsertItemTemplate>
            <ItemTemplate>
                id:
                <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>'></asp:Label><br />
                标题:
                <asp:Label ID="titleLabel" runat="server" Text='<%# Bind("title") %>'></asp:Label><br />
                具体内容:
                <asp:Label ID="contentLabel" runat="server" Text='<%# Bind("content") %>'></asp:Label><br />
                <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
                    Text="编辑"></asp:LinkButton>
                <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
                    Text="删除"></asp:LinkButton>
                <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
                    Text="新建"></asp:LinkButton>
            </ItemTemplate>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#999999" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        </asp:FormView>
                </td>
                <td style="width: 251px">
                </td>
            </tr>
        </table>
        &nbsp;
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [content], [id] FROM [ggao] WHERE ([content] = @content)">
            <SelectParameters>
                <asp:ControlParameter ControlID="GridView1" Name="content" PropertyName="SelectedValue"
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [id], [title], [time] FROM [ggao] ORDER BY [time] DESC" DeleteCommand="DELETE FROM [ggao] WHERE [id] = @id" InsertCommand="INSERT INTO [ggao] ([title], [time]) VALUES (@title, @time)" UpdateCommand="UPDATE [ggao] SET [title] = @title, [time] = @time WHERE [id] = @id">
            <DeleteParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="title" Type="String" />
                <asp:Parameter Name="time" Type="DateTime" />
                <asp:Parameter Name="id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="title" Type="String" />
                <asp:Parameter Name="time" Type="DateTime" />
            </InsertParameters>
        </asp:SqlDataSource>
        &nbsp;
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [id], [title], [content] FROM [ggao]" DeleteCommand="DELETE FROM [ggao] WHERE [id] = @id" InsertCommand="INSERT INTO [ggao] ([title], [content]) VALUES (@title, @content)" UpdateCommand="UPDATE [ggao] SET [title] = @title, [content] = @content WHERE [id] = @id">
            <DeleteParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="title" Type="String" />
                <asp:Parameter Name="content" Type="String" />
                <asp:Parameter Name="id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="title" Type="String" />
                <asp:Parameter Name="content" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
        &nbsp;&nbsp;
    
    </asp:Content>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -