I have a checkbox list control that contains about 20 checkboxes that capture an individuals interests. For example, fishing, music, cookery etc
I need to use these checkboxes as a search for a dynamic query to sql server. So if "cookery" is checked then I alter my sql query like this
if (checkbox number 23 is checked) //it must be cookery so add it to our WHERE clause
oClause.column = "[Cookery]";
oClause.operand = " = ";
oClause.criteria = "1";
What is the best way to loop through the checkbox list to add checked items to my sql query?