多个复选框的读取选中
来源:互联网 发布:数控车床编程好学么 编辑:程序博客网 时间:2024/04/27 16:35
protected void ResponseCheckBoxHTML()
{
CreateCheckBoxHTML = string.Empty;
List<VCollaborationService> lst = ServiceItemDataAccess.GetCategoryName();
for (int i = 0; i < lst.Count; i++)
{
if (SelectCateogyrs != null && SelectCateogyrs.Count > 0)
{
CreateCheckBoxHTML += ("<input class='chkCategory' type='checkbox' name='chkCategory' id='bhkCategory" + lst[i].ProCategoryID + "' value='" + lst[i].ProCategoryID + "' " + (SelectCateogyrs.Contains(lst[i].ProCategoryID.ToString()) ? " checked='checked' " : "") + "/><label for='bhkCategory" + lst[i].ProCategoryID + "'>" + lst[i].CategoryName + "</label>");
}
else if (CsSelectCategorys != null && CsSelectCategorys.Count > 0)
{
CreateCheckBoxHTML += ("<input class='chkCategory' type='checkbox' name='chkCategory' id='bhkCategory" + lst[i].ProCategoryID + "' value='" + lst[i].ProCategoryID + "' " + (CsSelectCategorys.Contains(lst[i].ProCategoryID.ToString()) ? " checked='checked' " : "") + "/><label for='bhkCategory" + lst[i].ProCategoryID + "'>" + lst[i].CategoryName + "</label>");
}
else
{
CreateCheckBoxHTML += ("<input class='chkCategory' type='checkbox' name='chkCategory' id='bhkCategory" + lst[i].ProCategoryID + "' value='" + lst[i].ProCategoryID + "'/><label for='bhkCategory" + lst[i].ProCategoryID + "'>" + lst[i].CategoryName + "</label>");
}
}
}
{
CreateCheckBoxHTML = string.Empty;
List<VCollaborationService> lst = ServiceItemDataAccess.GetCategoryName();
for (int i = 0; i < lst.Count; i++)
{
if (SelectCateogyrs != null && SelectCateogyrs.Count > 0)
{
CreateCheckBoxHTML += ("<input class='chkCategory' type='checkbox' name='chkCategory' id='bhkCategory" + lst[i].ProCategoryID + "' value='" + lst[i].ProCategoryID + "' " + (SelectCateogyrs.Contains(lst[i].ProCategoryID.ToString()) ? " checked='checked' " : "") + "/><label for='bhkCategory" + lst[i].ProCategoryID + "'>" + lst[i].CategoryName + "</label>");
}
else if (CsSelectCategorys != null && CsSelectCategorys.Count > 0)
{
CreateCheckBoxHTML += ("<input class='chkCategory' type='checkbox' name='chkCategory' id='bhkCategory" + lst[i].ProCategoryID + "' value='" + lst[i].ProCategoryID + "' " + (CsSelectCategorys.Contains(lst[i].ProCategoryID.ToString()) ? " checked='checked' " : "") + "/><label for='bhkCategory" + lst[i].ProCategoryID + "'>" + lst[i].CategoryName + "</label>");
}
else
{
CreateCheckBoxHTML += ("<input class='chkCategory' type='checkbox' name='chkCategory' id='bhkCategory" + lst[i].ProCategoryID + "' value='" + lst[i].ProCategoryID + "'/><label for='bhkCategory" + lst[i].ProCategoryID + "'>" + lst[i].CategoryName + "</label>");
}
}
}
0 0
- 多个复选框的读取选中
- 多个复选框checkbox选中问题
- 初始化时选中多个复选框
- 复选框(checkbox)多个选中问题
- 设置多个复选框选中与取消选中
- 复选框的选中事件
- 复选框选中的判断~
- AngularJS:表格中选择了多个复选框后如何通过点击提交按钮将复选框选中的数据提取出来
- 显示复选框选择的内容--如何读取多个选项(asp)
- 选中复选框,取消选中复选框
- 统计选中的复选框的个数
- 检测复选框选中的个数
- 限制表单复选框的选中个数
- 动态创建默认选中的复选框
- 获取被选中的复选框数量
- 弹出选中复选框的个数
- jQuery获取复选框选中的个数
- html,删除复选框选中的内容
- Oracle11g密码区分大小写导致datab…
- javascript实现屏蔽鼠标右键功能
- 字段内容过多,隐藏内容,鼠标移上…
- 并查集1069 关押罪犯
- dblink查看、创建、使用、删除
- 多个复选框的读取选中
- 查看连接池连接数
- js中eval详解(转载)
- JS中的prototype
- 计算机视觉领域的一些牛人博客,超有实力的研究机构等的网站链接
- B/S与C/S的联系与区别
- 金额转换,阿拉伯数字的金额转换成…
- HDU 1869 六度分离 【floyd】
- 请写出你最常见到的5个runtime&nbs…