Search Query
-
I have an aspx page with 3 textboxes and a submit button. I'm trying to build a query string to return results based on what is entered in the textboxes by the user. Each textbox corresponds to columns in my database. How do I go about building my query string. Please provide code in C# if possible. Thanks,
-
I have an aspx page with 3 textboxes and a submit button. I'm trying to build a query string to return results based on what is entered in the textboxes by the user. Each textbox corresponds to columns in my database. How do I go about building my query string. Please provide code in C# if possible. Thanks,
string myQuery = "SELECT * FROM MyTable WHERE column1 = '" + textbox1.Text + " AND column2 = '" + textbox2.Text + "' AND column3 = '" + textbox3.Text + "'"; That is not very good but a good start for the student who wants someone else to do his homework.