That means that when you type "AB" in your TextBox, you're going to get a PostBack for "A" and one for "B". Not a very good solution, plus the fact that you're not going to get the results that you want, because you're then going to filter on "A" and then "B", never "AB".
Why not just place a button by the TextBox and when pressed, it reads the TextBox value and filters on that?
In the aspx file:
<asp:label id="filterLabel" runat="server">Filter by:</asp:label>
<asp:TextBox id="filterTextBox" runat="server" Width="100px"></asp:TextBox>
<asp:button id="filterButton" runat="server" text="Go" height="24px" width="25px" OnClick="filterButton_Click"></asp:button>
in the aspx.cs file
protected void filterButton_Click(object sender, System.EventArgs e)
{
string filterText = filterTextBox.Text.Trim();
if ( filterTextBox.Text.Trim().Length > 0 )
{
// Filter your Grid on the value filterTextBox.Text.Trim()
}
}
NC...