change the datasource on the fly - in the code behind.
say for example
in page load you have
sql.commandtext = "select * from users";
gridview1.datasource = sql.ExecuteReader();
in search button click:
sql.commandtext = "select * from users where name LIKE '%" + textbox1.text + "%'";
gridview1.datasource = sql.ExecuteReader();
GL