protected void Page_Load(object sender, EventArgs e) { Page.Form.DefaultFocus = TextBoxSearch.ClientID; Page.Form.DefaultButton = ButtonSearch.UniqueID; if (!IsPostBack) { string searchValue = "%"; GridViewResult.DataSource = Catman.GetCatmanListByFilter(searchValue); GridViewResult.DataBind(); } }
protected void ButtonSearch_Click(object sender, EventArgs e) { GridViewResult.DataSource = Catman.GetCatmanListByFilter("%" + TextBoxSearch.Text + "%"); GridViewResult.DataBind(); }