WEB CheckBoxList 只读

来源:互联网 发布:新开的淘宝店怎么推广 编辑:程序博客网 时间:2024/05/17 03:01

CheckBoxList 只读实现:

         1) this.checkedListBox1.SelectionMode = SelectionMode.None  //web页面中找不到该属性

         2) Enable属性是禁用,控件会变灰,只读的效果是不变会,但禁止操作,不一样。

         3)只读效果,后台方式

                    for (int i= 0; i< this.CheckBoxList1.Items.Count; i++)

                   {

                       this.CheckBoxList1.Items[i].Attributes["onclick"] = "this.checked=!this.checked";

                  }
 参考:http://topic.csdn.net/u/20091202/16/3810216a-edb9-4b8a-816c-4d909f0ce7c3.html,http://topic.csdn.net/u/20090105/11/bbc6427e-56e7-4925-9b8e-f358764876d0.html

原创粉丝点击