i'm using VB.NET.
i have a table names "EMP". this table contain employee details like Index, empID, First name, Last name, address, phone number etc.
while page loads, i need to display Last name First name of all employees in a listbox. and if i select any employee name from listbox and press "EDIT" button, then i need to display the employee details for that particular employee what we selected in listbox.
right now what i did is like when an emp is selected in listbox, i will check the last name and first name in database and display details. but if two employees were there having same first name and last name, then error will occurs and the corresponding employees detail won't be displayed. but i need only first name and last name in listbox.
in that table Index and EMPID were non Dupicated numbers. so any way is there to give index for each employee name in listbox and when an employee name is selected, then according to that index search in database and get corresponding employee details.
if any one have any idea how to do this please let me know. and if you can provide an example then that will be great help for me.
thanks in advance.
i have a table names "EMP". this table contain employee details like Index, empID, First name, Last name, address, phone number etc.
while page loads, i need to display Last name First name of all employees in a listbox. and if i select any employee name from listbox and press "EDIT" button, then i need to display the employee details for that particular employee what we selected in listbox.
right now what i did is like when an emp is selected in listbox, i will check the last name and first name in database and display details. but if two employees were there having same first name and last name, then error will occurs and the corresponding employees detail won't be displayed. but i need only first name and last name in listbox.
in that table Index and EMPID were non Dupicated numbers. so any way is there to give index for each employee name in listbox and when an employee name is selected, then according to that index search in database and get corresponding employee details.
if any one have any idea how to do this please let me know. and if you can provide an example then that will be great help for me.
thanks in advance.