Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. chkApplications.SelectedValue = 2;
  2. chkApplications.SelectedValue = 6;
  3.  
  4. chkApplications.Items.FindByValue("2").Selected = true;
  5. chkApplications.Items.FindByValue("6").Selected = true;
  6.  
  7. foreach (ListItem item in chkApplications.Items)
  8. {
  9. if (item.Value == "2" || item.Value == "6")
  10. {
  11. item.Selected = true;
  12. }
  13. }
  14.  
  15. foreach (var item in cb.Items.Cast<ListItem>()
  16. .Where (li => li.Value == "2" || li.Value == "6"))
  17. item.Selected = true;
  18.  
  19. foreach (var item in MyList)
  20. {
  21. checkBoxList.Items.FindByValue(item.id).Selected = true;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement