You can delay the postback from the text box and cancel it when you click the button. To do this, add the code below to the Page_PreRender method:
protected void Page_PreRender(object sender, EventArgs e) { Button1.OnClientClick = string.Format("if(window.{0}Timeout){{ clearTimeout(window.{0}Timeout); }}", TextBox1.ClientID); TextBox1.Attributes["onChange"] = string.Format("javascript:window.{0}Timeout = setTimeout(\"{1}\", 500); return;", TextBox1.ClientID, ClientScript.GetPostBackEventReference(TextBox1, "")); }
source share