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

📄 link.aspx

📁 计算机实验课在线答疑系统 09年毕业设计
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="link.aspx.cs" Inherits="admin_link" %>

<!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>
</head>
<body>
    <form id="form1" runat="server">
    <div align=center>
        <asp:ListBox ID="ListBox1" runat="server" DataSourceID="SqlDataSource1" DataTextField="class"
            DataValueField="class" Height="205px" Width="243px" BackColor="WhiteSmoke"></asp:ListBox><asp:SqlDataSource
                ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                DeleteCommand="DELETE FROM [class] WHERE [id] = @id" InsertCommand="INSERT INTO [class] ([class]) VALUES (@class)"
                SelectCommand="SELECT * FROM [class] ORDER BY [id]" UpdateCommand="UPDATE [class] SET [class] = @class WHERE [id] = @id">
                <DeleteParameters>
                    <asp:Parameter Name="id" Type="Int32" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="class" Type="String" />
                    <asp:Parameter Name="id" Type="Int32" />
                </UpdateParameters>
                <InsertParameters>
                    <asp:Parameter Name="class" Type="String" />
                </InsertParameters>
            </asp:SqlDataSource>
        &nbsp;
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="id"
            DataSourceID="SqlDataSource1" DefaultMode="Insert" Height="50px" Width="247px" CellPadding="4" ForeColor="#333333" GridLines="None">
            <Fields>
                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                    SortExpression="id" />
                <asp:BoundField DataField="class" HeaderText="输入类别:" SortExpression="class" />
                <asp:CommandField ShowInsertButton="True" />
            </Fields>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
            <EditRowStyle BackColor="#999999" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:DetailsView>
        <asp:LinkButton ID="LinkButton1" runat="server" BackColor="InactiveCaption" Font-Bold="True"
            Font-Italic="False" Font-Overline="False" Font-Size="X-Large" Font-Underline="True"
            ForeColor="#404040" Height="20px" PostBackUrl="~/admin/linki.aspx" Width="244px">          返回                   </asp:LinkButton><br />
        <asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click" Width="66px" BackColor="Gray" Font-Bold="True" Font-Size="X-Large" Font-Underline="False" ForeColor="#404040" Height="23px" Visible="False">编辑</asp:LinkButton>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" DataSourceID="SqlDataSource2" CellPadding="0" ForeColor="#333333" GridLines="None" Visible="False" Width="244px">
            <Columns>
                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" SortExpression="id" />
                <asp:BoundField DataField="class" HeaderText="class" ReadOnly="True" SortExpression="class" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <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>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            DeleteCommand="DELETE FROM [class] WHERE [class] = @class" InsertCommand="INSERT INTO [class] ([class]) VALUES (@class)"
            SelectCommand="SELECT * FROM [class]" UpdateCommand="UPDATE [class] SET [id] = @id WHERE [class] = @class">
            <DeleteParameters>
                <asp:Parameter Name="class" Type="String" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="id" Type="Int32" />
                <asp:Parameter Name="class" Type="String" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="class" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

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