如何在asp.net的Checkboxlist控件中查找选中的项目 [英] how to find out checked items in Checkboxlist control of asp.net

查看:339
本文介绍了如何在asp.net的Checkboxlist控件中查找选中的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨弗里德斯
我是Dot net的新手,目前正在Studio 2005工作.
我想从复选框列表控件中找到选中的项目.如何找到它.对此的任何解决方案.

谢谢

Hi Frieds
I am new in Dot net.and I am currently working on studio 2005.
I want to find out the checked items from check list box control.how do I find it.any solution for this.

Thank you

推荐答案

最简单的方法是运行循环
The easiest way to do this is to run a loop
foreach (ListItem lst in chkList.Items)
   {
      if (lst.Selected)
      {
      //Do something
      }
   }


这篇关于如何在asp.net的Checkboxlist控件中查找选中的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆