try something like this:
string sqlQuery="Select * from table where ";
string whereClause = String.Empty;
if(querystringvalues=null){
whereClause = "E.IsLockedOut='False'";
}
else{
whereClause="create with querysting clause";
}
SqlDataSource1.SelectCommand = sqlQuery + whereClause;