string query = "Select * from Products where " + Request.QueryString["PriceID"].ToString() + "<5000";
Use parametrized query
Or you can use
filter
in your
DataSet
or
DataTable
EDIT
Actually whats the value of
Eval("UnitCost")
? Because the field name missing in your query(above code). You code should like below.
string query = "Select * from Products where PriceID<5000";
Here you must send the value 5000 dynamically. Correct me if anything wrong
EDIT2
So you want to select products by range?
Your code should be like(There should be two columns in where condition
ProductId
&
UnitCost
)
string query = "Select * from Products where ProductID= '" + Request.QueryString["ID"].ToString() + "' AND UnitCost < 5000";
BTW again I suggest you to use parametrized query.