asp.net中的清单 [英] checkboxlist in asp.net

查看:58
本文介绍了asp.net中的清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




如何在checkboxlist




how to display the checked items in checkboxlist

推荐答案

中Google选中的项目显示在您的位置?在 Google [ http://www.w3schools.com/aspnet/control_checkboxlist.asp [ http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.checkboxlist.aspx [ ^ ]
Is Google broken at your place? It is much faster for looking at these ''How to'' questions on Google[^].

I seached, and some of the very first links promising to me.

http://www.w3schools.com/aspnet/control_checkboxlist.asp[^]

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.checkboxlist.aspx[^]


void Check_Clicked(Object sender, EventArgs e)
      {
         Message.Text = "Selected Item(s):<br><br>";

         // Iterate through the Items collection of the CheckBoxList
         // control and display the selected items.
         for (int i=0; i<checkboxlist1.Items.Count; i++)
         {
            if (checkboxlist1.Items[i].Selected)
            {
               Message.Text += checkboxlist1.Items[i].Text + "<br>";

            }
         }
      }


参考: CheckBoxList类 [ ^ ]


Ref: CheckBoxList Class[^]


另请参阅此链接

http://www.dotnetcurry.com/ShowArticle.aspx?ID=77 [ ^ ]

谢谢
--RA
See this link also

http://www.dotnetcurry.com/ShowArticle.aspx?ID=77[^]

Thanks
--RA


这篇关于asp.net中的清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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