I have a textbox name TextBox1.Text. When I typing in Textbox the some filed value are autofill from database. i.e.
In textbox accept both value for example when I type Keyword @Name it show the Name of all Employees
In textbox accept both value for example when I type Keyword @CompanyName it show the List of Company.
Example: My Name is @Name and I Worked in @companyName joining date is @JoinDate to @tillDate.
| @ID | @Name | @CompanyName | @JoiningDate |
| 1 | vinod | ABC | 01-Jan-2010 |
| 2 | Raju | AAA | 31-Dec-2011 |

Iftikar HussainRank #423 · 5.9K reputationPosted Aug 23, 2013, 1:35 AM EDT
How you will distinguish weather user has typed Name or Company name?
Regards,
Iftikar
vinod mishra26 reputationPosted Aug 23, 2013, 1:51 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 23, 2013, 1:54 AM EDT
string searchData;
select *from yourtable where (name like searchData+'%' or compnayname like searchData+'%')
Regards,
Iftikar
vinod mishra26 reputationPosted Aug 23, 2013, 2:14 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 23, 2013, 2:17 AM EDT
http://www.asp.net/ajaxlibrary/act_autocomplete_simple.ashx
Regards,
Iftikar
venkata kumarRank #5,034 · 314 reputationPosted Aug 23, 2013, 4:26 AM EDT
use the fallowing query
select *from tablename where columnname1=@perametername or columnname2=@perametername or columnname3=@perametername or columnname4=@perametername