Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I bind textbox with autocomplte feature and its working fine to me.
But I want to save id not the text.
For example :
Id : 1
Value : Nilesh

In textbox autocomplete I am showing 'Nilesh' as value which is correct but in db I want to save id '1'.

Can you tell me how I can do this?

What I have tried:

i tried lots of way to do but nothing help to me.
No way to get id of selected text.
Posted
Updated 1-Dec-19 5:20am

Maybe you can do it with a ComboBox, see CodeProject article: Auto Complete ComboBox[^]
 
Share this answer
 
create object on client side to store id and name.. bind that classitme with your combobox and set Displayname as name.
when you select the item you get the instance of that class where you can access the all properties.
 
Share this answer
 

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