兰保明

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
 1  StringBuilder str = new StringBuilder();
2 foreach (Control ctr in this.Page.Controls[3].Controls)
3 {
4 if (ctr.GetType().Name == "CheckBox")
5 {
6 CheckBox cb = (CheckBox)ctr;
7 if (cb.Checked)
8 str.Append(cb.Text + "<br/>");
9 }
10 }
11 Literal1.Text = str.ToString();

posted on 2011-08-15 10:56  兰保明  阅读(124)  评论(0编辑  收藏  举报