关于分页
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DishCateManager.aspx.cs"
Inherits="Project.Admin.DishCateManager" %>
<!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>
<link href="../css/element.css" rel="stylesheet" type="text/css" />
<script src="js/jQuery.js"></script>
</head>
<body>
<form id="form1" runat="server">
<table class="maintd" style="width: 70%">
<tr>
<td>
<input type="checkbox" id="cball" onclick="selectall(this)" />
</td>
<td>
类别名称
</td>
<td>
是否显示
</td>
<td>
操作
</td>
</tr>
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<tr>
<td>
<input type="checkbox" name="cbany" cnts='<%#Eval("cnts") %>' cateid='<%#Eval("dishcate_id") %>' />
</td>
<td>
<%#Eval("dishcate_name") %>
</td>
<td>
<%#Eval("isshow").ToString()=="1"?"显示":"不显示" %>
</td>
<td>
<a href='javascript:add(<%#Eval("dishcate_id") %>);'>编辑</a>|
<asp:LinkButton OnClientClick="return confirm('是否确定删除?')" OnClick="DelClick" Visible='<%#((int)Eval("cnts"))>0?false:true %>'
ID="btnDel" runat="server" cateid='<%#Eval("dishcate_id") %>'>删除</asp:LinkButton>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<asp:TextBox ID="txtids" runat="server" Style="display: none"></asp:TextBox>
<a href="javascript:add();">添加</a> <asp:LinkButton runat="server"
ID="btndelall" OnClientClick="return delall()" OnClick="btndelall_Click">批量删除</asp:LinkButton></form>
</body>
</html>
<script>
$(function() {
//获取到数据行中所有的复选框
$("input[name='cbany']").each(function() {
//如果当前的商品数量大于0,则禁用复选框
if (parseInt($(this).attr("cnts")) > 0) {
$(this).attr("disabled", true);
}
})
})
///全选
function selectall(obj) {
&