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

📄 updata_t.aspx

📁 实现投票 实现一个数据表多个投票系统 实现一个数据表多个投票系统实现一个数据表多个投票系统 实现一个数据表多个投票系统
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="updata_t.aspx.cs" Inherits="updata_t" %>

<!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>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333"
            GridLines="None">
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <Columns>
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowSelectButton="True" />
                <asp:BoundField DataField="t_id" HeaderText="t_id" InsertVisible="False" ReadOnly="True"
                    SortExpression="t_id" />
                <asp:BoundField DataField="t_title" HeaderText="t_title" SortExpression="t_title" />
                <asp:BoundField DataField="t_context" HeaderText="t_context" SortExpression="t_context" />
                <asp:BoundField DataField="t_datetime" HeaderText="t_datetime" SortExpression="t_datetime" />
            </Columns>
            <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="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ooofcudrpConnectionString %>"
            DeleteCommand="DELETE FROM [t_table] WHERE [t_id] = @t_id" InsertCommand="INSERT INTO [t_table] ([t_title], [t_context], [t_datetime]) VALUES (@t_title, @t_context, @t_datetime)"
            SelectCommand="SELECT * FROM [t_table]" UpdateCommand="UPDATE [t_table] SET [t_title] = @t_title, [t_context] = @t_context, [t_datetime] = @t_datetime WHERE [t_id] = @t_id">
            <DeleteParameters>
                <asp:Parameter Name="t_id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="t_title" Type="String" />
                <asp:Parameter Name="t_context" Type="String" />
                <asp:Parameter Name="t_datetime" Type="String" />
                <asp:Parameter Name="t_id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="t_title" Type="String" />
                <asp:Parameter Name="t_context" Type="String" />
                <asp:Parameter Name="t_datetime" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

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