You are probably clearing the TextBoxes BEFORE you bind your grid. Consider:
textBox1.Text = "";
textBox2.Text = "";
//Create some query to bind the GridView
GridView1.DataSource = ds;
GridView1.DataBind();
This obviously will return no results to your grid since the values you create you query on are blank so try this instead:
//Create some query to bind the GridView
GridView1.DataSource = ds;
GridView1.DataBind();
textBox1.Text = "";
textBox2.Text = "";
Also, if you are handling the TextChanged event for these textboxes you will first need to remove the EventHanlder since changing the Text in code can cause thise event handler to fire:
textBox1.TextChanged -= new EventHandler(<TextChanged Event>);
textBox2.TextChanged -= new EventHandler(<TextChanged Event>);
textBox1.Text = "";
textBox2.Text = "";
textBox1.TextChanged += new EventHandler(<TextChanged Event>);
textBox2.TextChanged += new EventHandler(<TextChanged Event>);
hth.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========