<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/Master/AdminMP.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MyCms.Manage.Categories.Default" %>
<%@ MasterType VirtualPath="~/Manage/Master/AdminMP.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="table_normal" cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <th>编号</th>
                <th>分类名称</th>
                <th>描述</th>
                <th>操作</th>
            </tr>
        </thead>    
        <tbody>
            <asp:Repeater ID="rpCategories" runat="server">
                <ItemTemplate>
                    <tr>
                        <td><%#Eval("CategoryID") %></td>
                        <td><%#Eval("CategoryName") %></td>
                        <td><%#Eval("Description") %></td>
                        <td><a href="CategoryEdit.aspx?categoryid=<%#Eval("CategoryID") %>">编辑</a> <a href="javascript:del(<%#Eval("CategoryID") %>);">删除</a></td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
            
        </tbody>
    </table>
    <script>function del(id) {
    if (confirm("分类下的文章都会被删除，删除后无法恢复，是否继续？")) {
        document.location = "<%=ResolveUrl("~/Handler/Action.ashx?action=del&target=category&id=") %>" + id;
    }
}</script>
</asp:Content>
