CFXIXI工作室首页
CF西西的博客 | ASP.Net CheckboxList 控件设置key和value

ASP.Net CheckboxList 控件设置key和value

18. 四月 2013

DataTextField 和DataValueField 进行设定

authorityCheckboxList.DataSource = menuTtems;

            authorityCheckboxList.RepeatColumns = 2;

            authorityCheckboxList.DataTextField = "Name";

            authorityCheckboxList.DataValueField = "CustomId";

            authorityCheckboxList.DataBind();

ASP.Net