Fork me on GitHub

webform checkboxlist回填数据

var checkItem = M_PermissionsBz.yz.GetModelList("UserId=" + userId);
            foreach (var item in checkItem)
            {
                foreach (ListItem listItem in ChkBoxList.Items)
                {
                    if (item.TreeId.ToString() == listItem.Value)
                    {
                        listItem.Selected = true;
                    }
                    else
                    {
                        continue;
                    }
                }
            }

 

posted @ 2018-06-08 09:02  秋刀鱼de滋味  阅读(332)  评论(0编辑  收藏  举报