How can we write sqldatasource selectcommand string based on a variable from the codebehind.
selectcommand="select field1,field2 from table where field="+<%=intvariablename%>
here i am getting some syntax error...
its very urgent
Sqldatasource selectcommand string
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Blocked AccountRank #403 · 6.2K reputationPosted Jan 28, 2008, 8:52 PM EST
U can do this by adding the control parameter.
selectcommand="select field1,field2 from table where field in(@intvariablename)"
Happy Coding!!