string StrConn = WebConfigurationManager.ConnectionStrings["Test"].ToString();
SqlConnection Conn = new SqlConnection(StrConn);
Conn.Open();
string sqlProduct;
sqlProduct = " SELECT * FROM Tree WHERE (id between '" + TextBox1.Text + "' and '" + TextBox2.Text + "' ) ";
SqlDataAdapter da = new SqlDataAdapter(sqlProduct, Conn);
DataSet ds = new DataSet();
da.Fill(ds, "Tree");
GridView1.DataSource = ds.Tables["Tree"];
GridView1.DataBind();