You could try this..
protected void btnSearch_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection("YourConnection");
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_Search";
cmd.Parameters.AddWithValue("@TEXTBOX1", TextBox1.Text);
cmd.Parameters.AddWithValue("@TEXTBOX2", TextBox2.Text);
cmd.ExecuteNonQuery();
DataTable dt = new DataTable();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
gvYourGrid.DataSource = dt;
gvYourGrid.DataBind();
}
And then create a stored procedure like this in your SQL
CREATE PROCEDURE [dbo].[sp_Search]
@TEXTBOX1 AS VARCHAR(100),
@TEXTBOX2 AS VARCHAR(100)
AS
BEGIN
SELECT * FROM YourTable WHERE YourColumn1 = @TEXTBOX1 and YourColumn2 = @TEXTBOX2
END