In C#, I am trying to Check an item in a CheckBoxList where the text equals what I require.
I would modify the code to check items that exist in the database.
If you would like an example, i need to select the checklistbox item that equals to abc
In C#, I am trying to Check an item in a CheckBoxList where the text equals what I require.
I would modify the code to check items that exist in the database.
If you would like an example, i need to select the checklistbox item that equals to abc
All Credit to @Jim Scott -- just added one touch. (ASP.NET 4.5 & C#)
Refractoring this a little more... if you pass the CheckBoxList as an object to the method, you can reuse it for any CheckBoxList. Also you can use either the Text or the Value.
//Multiple selection:
using ==>
Example based on ASP.NET CheckBoxList
Assuming that the items in your CheckedListBox are strings:
Or