I want to search record based on Name, ID, Date, Report Type. from same table with one textbox,. can any one give me solution,.
i can do search with one column how can do it with multiple column
protected void Button2_Click(object sender, EventArgs e)
{
DateTime dt = Convert.ToDateTime(TextBox1.Text);
SqlCommand cmd = new SqlCommand("SELECT * FROM Transactions where report_type = @report_type ");
cmd.Connection = con;
cmd.Parameters.Add("@report_type", SqlDbType.NVarChar).Value = DropDownList1.SelectedValue;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}