Click here to Skip to main content
15,885,880 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have created one item name 'pen' for Item table. On form level i want that when the user will enter a particular alphabet in a textbox starting with p'', the list should popup with only those elements starting with that particular alphabet..code please.......
Posted

Use SQL LIKE:
SQL
SELECT * FROM myTable WHERE myTextColumn LIKE 'p%'
The percent character is "match zero of more of any character" - similar to '*' in file names.
 
Share this answer
 
Use Like[^] operator.

..and you can code here[^]
 
Share this answer
 
You can use AJAX/jQuery Extensions which will ease your work.
If you have idea regarding these technologies then you better use these advanced concepts instead of going with SQL Query.

Try & if not getting how to do, Feel free to ask me here.

Regards,
Gittu.
 
Share this answer
 
Comments
Sharon 2 25-Mar-13 8:56am    
can you please show an example.
P_Dash 26-Mar-13 7:07am    
Okay.
Give me 1 Day time.
I'll show you an Demo example with Code.

Just tell me do you have knowledge of Ajax Control Toolkit ?
Sharon 2 26-Mar-13 7:16am    
actually i'm doing in c# windows application
P_Dash 26-Mar-13 7:35am    
Oops.
In Windows Application how can you implement jQuery/AJAX ?
You have to go for SQL Query only.
Otherwise you can use LINQ if possible.
Sharon 2 26-Mar-13 7:19am    
but i know ajax toolkit

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900