Good Day
am working on asp.net 2.0, c#
i stored checkbox list selected values separating with . as
Expand|Select|Wrap|Line Numbers
- string s = null;
- for (int i = 0; i < chlistDomains.Items.Count; i++)
- {
- if (chlistDomains.Items[i].Selected)
- {
- s = s + chlistDomains.Items[i].Value + ".";
- }
- }
now am trying to selectcheckbox list values which are in that string variable
i wrote following code but it is selecting last value only
Expand|Select|Wrap|Line Numbers
- string[] sp1 = pref.Split('.');
- for (int j = 0; j < sp1.Length; j++)
- {
- clistPrefferedEmployement.SelectedValue = Convert.ToString(sp1[j]);
- }
Thanks in advance