protected void txtSearch_TextChanged(object sender, EventArgs e) { string cn=ConfigurationManager.ConnectionStrings["testing"].ConnectionString; using(SqlConnection connection = new SqlConnection(cn)) { SqlCommand command = new SqlCommand("select * from country where EmployeeName=@EmployeeName", connection); command.Parameters.AddWithValue("@EmployeeName", txtSearch); connection.Open(); SqlDataReader dr = command.ExecuteReader(); GridView1.DataSource = dr; GridView1.DataBind(); }
insert into Country values (1,'India','Kiran') insert into Country values (2,'India','Karan')
TextBox1.AutoPostBack = true;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)