protected void TextBox1_TextChanged(object sender, EventArgs e)
{
con = new SqlConnection(connectionstring);
con.Open();
adapt = new SqlDataAdapter("select * from table where product like '" + TextBox1.Text + "%'", con);
dtsdf = new DataTable();
adapt.Fill(dtsdf);
gvContact1.DataSource = dtsdf;
con.Close();
}
Search box :-
<asp:Label ID="search" runat="server" Text="search" ></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>