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

📄 class.aspx

📁 一个实现新闻基本功能(文章添加、删改、列表、后台管理
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" Inherits="_Class" Codebehind="Class.aspx.cs" %>

<!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">
<Link href=style.css rel=stylesheet />

    <title>添加类别</title>
</head>
<body style="font-family: Times New Roman">
    <form id="form1" runat="server">
    <div align="center">
        <table border="0" cellpadding="0" cellspacing="0" style="border-right: #cccccc 1px solid;
            border-top: #cccccc 1px solid; border-left: #cccccc 1px solid; width: 760px;
            border-bottom: #cccccc 1px solid">
            <tr>
                <td bgcolor="#cccccc" style="height: 15px">
                    <a href="Class.aspx?Action=Add">栏目(添加)管理</a> --- --- --- <a href="AddNews.aspx?Action=Add"><span style="font-family: Times New Roman">
                        新闻(添加)管理</span></a> --- --- --- <a href="Class.aspx?Action=Logout"><span style="font-family: Times New Roman">
                            退出后台</span></a></td>
            </tr>
            <tr style="font-family: Times New Roman">
                <td style="height: 78px">
                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                        <tr>
                            <td align="right" style="height: 15px; width: 294px;">
                                类别名称:</td>
                            <td style="height: 15px" align=left>
                                <asp:TextBox ID="tbx_class" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfv_class" runat="server" ControlToValidate="tbx_class"
                                    ErrorMessage="类别不能为空"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td align="right" style="width: 294px; height: 24px;">
                                外部URL:</td>
                            <td align=left style="height: 24px">
                                <asp:TextBox ID="tbx_url" runat="server"></asp:TextBox>不用请留空</td>
                        </tr>
                        <tr>
                            <td style="width: 294px">
                            </td>
                            <td align=left>
                                <asp:Button ID="btn_value" runat="server" Text="Button" OnClick="btn_value_Click" /></td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="message" runat="server" Font-Size="Small" ForeColor="Red"></asp:Label></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr style="font-family: Times New Roman">
                <td style="height: 15px">
                    <asp:GridView ID="gv_class" DataKeyNames="BigClassID" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" OnRowDeleting="gv_class_RowDeleting">
                        <Columns>
                            <asp:BoundField DataField="BigClassID" HeaderText="编号" />
                            <asp:TemplateField HeaderText="栏目名称                    外部Url">
                                <ItemTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                        <tr>
                                            <td><%# DataBinder.Eval(Container.DataItem,"BigClassName") %>
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                            <%# DataBinder.Eval(Container.DataItem,"BigClassUrl") %>
                                            </td>
                                        </tr>
                                    </table>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:HyperLinkField DataNavigateUrlFields="BigClassID" DataNavigateUrlFormatString="class.aspx?id={0} &amp;Action=Edit"
                                HeaderText="编辑" Text="编辑" />
                            <asp:CommandField ShowDeleteButton="True" ButtonType="Button" />
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#EFF3FB" />
                        <EditRowStyle BackColor="#2461BF" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
            <tr style="font-family: Times New Roman">
                <td style="height: 15px">
                </td>
            </tr>
            <tr style="font-family: Times New Roman">
                <td bgcolor="#cccccc" style="height: 15px">
                    Copyright 北京瀛嘉科技发展有限责任公司</td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

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