I have a problem I can't figure out.
I've been trying to add a listbox with multi select enabled as a parameter to my select statement in sqldatasource.
So i created a function like this :
string strItemTypes = "";
foreach (ListItem li in lbItemType.Items)
strItemTypes += "," + li.Value;
strItemTypes = strItemTypes.Substring(1);
which gives me the selected items like this for example : "1,2,3"...
Then I've been trying to add it to my sql select statement :
SELECT tblOfficesItems.idOfficesItems, tblStockItems.Name, tblStockItems.Description, tblStockItemTypes.TypeItem, tblStockItems.Notes FROM tblOfficesItems INNER JOIN tblStockItems ON tblOfficesItems.fkItem = tblStockItems.idItem INNER JOIN tblStockItemTypes ON tblStockItems.fkTypeItem = tblStockItemTypes.idTypeItem WHERE tblStockItems.fkTypeItem IN ( @fkTypeItems )
using a hiddenfield with a controlparameter of type=object
but it just don't seem to work, seems like the data just won't bind or something and I don't get any errors so I'm confused!!
then i tried this :
SELECT tblOfficesItems.idOfficesItems, tblStockItems.Name
View Complete Post