(VS 2010 C# Website) I have TextBox1 to filter FirstNames in a SQL database that will be displayed in a Datagrid, but I can’t figure out the proper way to link the user input from the “TextBox1.Text” into the WHERE clause for the Datagrid filtering. I’ve tried:
SelectCommand="SELECT * FROM [TestName] WHERE ([TestFirstName] LIKE '%' + TextBox1.Text + '%')"
1 Answer