I have a CheckBoxList
that is showing all A table C column.
SELECT DISTINCT C
FROM A
ORDER BY C
My A table has two columns.
B-->Primary Key
C--> Every C has a unique B.
I have an SQL like this for my Gridview Source;
Select <...............>
From <..................>
Where <.................>
AND A.B IN
(Select A.B
From A
Where A.C IN ALL CheckBoxList.SelectedItem.Value)
Something like that. My SQL syntax isn't very good. I hope you can tell what I want..
What I REALLY want is, when I click a button, Gridview should be populated according to the SQL , BUT filtered by what is selected in CheckBoxList.
Is there any way to add a parameter in the SQL IN clause? How can I do that?
Best Regards,
Soner