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 |
venkata kumarPosted Aug 23, 2013, 8:26 AM
use the fallowing query
select *from tablename where columnname1=@perametername or columnname2=@perametername or columnname3=@perametername or columnname4=@perametername
Iftikar HussainPosted Aug 23, 2013, 6:17 AM
http://www.asp.net/ajaxlibrary/act_autocomplete_simple.ashx
Regards,
Iftikar
vinod mishraPosted Aug 23, 2013, 6:14 AM
Iftikar HussainPosted Aug 23, 2013, 5:54 AM
string searchData;
select *from yourtable where (name like searchData+'%' or compnayname like searchData+'%')
Regards,
Iftikar
vinod mishraPosted Aug 23, 2013, 5:51 AM
Iftikar HussainPosted Aug 23, 2013, 5:35 AM
How you will distinguish weather user has typed Name or Company name?
Regards,
Iftikar