I have a series of numbers, comma separated, stored in SQL server. These numbers are the IDs of a Listbox. How can I select the Listboxes in C# based on the stored comma separated string?
CheckBoxList1.DataValueField = "id";
CheckboxList1.DataTextField = "location_name";
CheckBoxList1.DataSource = ds.Tables[0];
ChekBoxList1.DataBind();
The string is stored in SQL server table location, field toegang and the string looks like 34,656,43
It is better to enter it as create a table in the database and split data into new table
If you can't, you can split both in the sql server and in C#
C#(Split)
sql server(function STRING_SPLIT) example 1:
example 2: