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(); }
Select * from product where product_id like '%" + TextBox1.Text + "%' or category_id like '%" + TextBox1.Text + "%' or Categoryname like '%" + TextBox1.Text + "%'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)