-
DropDownList
Hi, i am a new bee in asp.net.I have a questiob to ask over here.
My table structure are as below:
EmpCode EmpName
0001 John
0002 Mike
0003 Steve
I pump the EmpName to the dropDownList and and let the user to select the employee.Is it possible when user select the employee, instead from getting the Empname as a result, the dropDownList return the empCode for me as a result.
Does anyone has idea to do this?
-
Re: DropDownList
A drop down list has two properties, DataValueField and DataTextField. You can set the first one as EmpCode and the second one as EmpName. While retrieving you can just retrieve the DataValueField.
-
Re: DropDownList