zoukankan      html  css  js  c++  java
  • CheckBoxList取值及勾选上

                string strrighgs = "";
                
    for (int i = 0; i < this.cblrighgs.Items.Count; i++)
                
    {
                    
    if (this.cblrighgs.Items[i].Selected == true)
                    
    {
                        strrighgs 
    += this.cblrighgs.Items[i].Value+"|";
                    }

                }


                
    string str = "";
                
    foreach (ListItem li in cblrighgs.Items)
                
    {
                    
    if (li.Selected == true)
                    
    {
                        str 
    += li.Value+";";
                    }

                }


                Response.Write(str);
                Response.End();
    勾选上:
                string[] strtemp = strapp.Split('|');
                
    foreach (string str in strtemp)
                
    {
                    
    for (int i = 0; i < cblrighgs.Items.Count; i++)
                    
    {
                        
    if (this.cblrighgs.Items[i].Value == str)
                        
    {
                            
    this.cblrighgs.Items[i].Selected = true;
                        }

                    }

                }
  • 相关阅读:
    Uva673 Parentheses Balance
    cordforce Educational Codeforces Round 47 补题笔记 <未完>
    cordforce 495 补题 <未完>
    linux 基本命令笔记
    app审核相关
    CATransform3D
    UITableView点击切换状态分析
    iOS大转盘抽奖
    被忽视的控件UIToolbar
    AVPlayerViewController视频播放器
  • 原文地址:https://www.cnblogs.com/cnaspnet/p/751293.html
Copyright © 2011-2022 走看看