I have below code in code behind for \[code\]btnShowReport_Click\[/code\]: \[code\]SqlDataSource1.SelectParameters.Clear(); SqlDataSource1.SelectParameters.Add("username", txtUsername.Text); SqlDataSource1.SelectParameters.Add("printer", ddlPrinter.Text); SqlDataSource1.SelectParameters.Add("to", Date.convertDateSolar2Gregorian(txtDateFrom_datepicker.Text));SqlDataSource1.SelectParameters.Add("from", Date.convertDateSolar2Gregorian(txtDateTo_datepicker.Text));SqlDataSource1.SelectCommand = "SELECT * FROM JobLog WHERE UserName=@username and PrinterName=@printer and TimeSubmitted between @to and @from"; \[/code\]I want when user doesn't fill some text boxes, in the query, the criteria of the textbox was ignored in query.I hope you understand what I want.