I am getting an error message. I am just wondering if this is even possible. please let me know if there is a better way to handle this. thank you
SqlDataSource1.SelectCommand &= " AND (p.datepur BETWEEN to_dateMinValue1, 'MM-DD-YYYY') AND to_dateMaxValue1, 'MM-DD-YYYY'))"
SqlDataSource1.SelectParameters.Add(":MinValue1", minComb1)
SqlDataSource1.SelectParameters.Add(":MaxValue1", maxComb1)
SqlDataSource1.SelectCommand &= " AND (p.datepur BETWEEN to_dateMinValue1, 'MM-DD-YYYY') AND to_dateMaxValue1, 'MM-DD-YYYY'))"
SqlDataSource1.SelectParameters.Add(":MinValue1", minComb1)
SqlDataSource1.SelectParameters.Add(":MaxValue1", maxComb1)