I need to pass a server-side parameter to my SqlDataSource SELECT IN-clause as follows (notice the parameter @InClause and it's location in the SQL-select that is defined in the aspx (for the SqlDataSource):
SELECT UID_REPORT, TXT_RPT_TEXT, TXT_RPT_NAME, TXT_RPT_ASPX_PAGE, TXT_RPT_TYPE
FROM REPORTS WHERE (UID_REPORT IN (@InClause))
ORDER BY INT_SORT_ORDER
But this does not pass validation in the Test-Query operation. The '@InClause' parameter gets it's value from a HiddenField control. I want to set this value based on some conditions. for example If DIVISION=5 then @InClause would ="45,46" Else ="14,15". Any suggestions on how to pass the IN ( ... ) values by the hiddenfield.Value (which is a string, of course). Thanks.