zoukankan      html  css  js  c++  java
  • 如何获取checkboxlist的多个选中项

                    string[] array = dt.Rows[0]["s_type"].ToString().Split('|');
                    foreach (ListItem m in cb_type.Items)
                    {
                        for (int i = 0; i < array.Length; i++)
                        {
                            if (m.Value == array[i])
                            {
                                m.Selected = true;
                            }
                        }
                    }
                    string[] strTerms = dt.Rows[0]["s_zhandian"].ToString().Split('|');
                    foreach (ListItem lItem in CB_zhandian.Items)
                    {
                        for (int i = 0; i < strTerms.Length; i++)
                        {
                            if (lItem.Value == strTerms[i])
                            {
                                lItem.Selected = true;
                            }
                        }
                    }

  • 相关阅读:
    MySQL 索引优化
    [转]多列索引
    abstract class和interface有什么区别? [转]
    PM knowledge
    委托应用场景[摘]
    Web 服务描述语言工具 (Wsdl.exe)[FROM msdn]
    C# 四个基本技巧[转]
    What are database states? [forward]
    学做程序经理[摘]
    SET IDENTITY_INSERT 学习心得[转]
  • 原文地址:https://www.cnblogs.com/candyzhmm/p/4255550.html
Copyright © 2011-2022 走看看