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;
                            }
                        }
                    }

  • 相关阅读:
    工具类网站收藏
    NodeJS 后端 解决 OPTIONS 请求 404 (Not Found)
    Linux scp 指令
    API及工具类页面链接
    JavaScript正则
    Git 常用
    React组件属性类型(propTypes)
    Meta http-equiv属性详解(转)
    js 刷新页面window.location.reload();
    XHTML标签的嵌套规则分析
  • 原文地址:https://www.cnblogs.com/candyzhmm/p/4255550.html
Copyright © 2011-2022 走看看