Posted on: 5/6/2014 3:52:36 PM | Views : 406

I am having a bit of trouble trying to search my database when I combine a textbox with a dropdown or any other option.
I can search by textbox or one dropdown. But when I combine one of the options it doesnt retunr anything. 
If I try any a combination of State and city or name and company, or any Or. I dont get anything. Only I can search by one option.
What am I missing?

private DataTable GetData(SqlCommand cmd) { DataTable dt = new DataTable(); String strConnString = System.Configuration.ConfigurationManager .ConnectionStrings["ConnectionString"].ConnectionString; SqlConnection con = new SqlConnection(strConnString); SqlDataAdapter sda = new SqlDataAdapter(); cmd.CommandType = CommandType.Text; cmd.Connection = con; try { con.Open(); sda.SelectCommand = cmd; sda.Fill(dt); ...

Go to the complete details ...