I have a Grid View populated by an ObjectDataSource. I have search box that can search through the Grid View. My query for searching is as below and it works only if the values in the Search Box completely matches the data in Grid View.
SELECT JobNo, AccountName, City
FROM Table_1
WHERE JobNo=@JobNo AND AccountName=@AccountName
Lets say the data in table is as below,
1234, Chris Smith, Chicago
5678, John Doe, New York
8789, Tim May, San Diego
So for my above search query to work correctly one needs to feed in JobNo=1234 and AccountName=John Doe in the search boxes. If I search for just JobNo=1234 and AccountName=John it won’t give any result.
So what I would need is for my query to show results even if I put part of the name in the search box. Is this possible?
For the specific scenario you’re describing, use