Click here to Skip to main content
13,090,178 members (49,384 online)
Rate this:
Please Sign up or sign in to vote.
See more:
i have table with columns empid, empname,empmanagerid, now if i type empid in textbox, empmanager name shod be display in supervisor dropdown.
if i type 1001 empid, corresponding manager name kanna should display in dropdown using entity framework.pls help me

empid empname empmanagerid
1001 jay 1002
1002 kanna 1001
1003 chandru 1002
1004 priya 1003
1005 venkat 1003
1006 ramana 1003
1007 sekhar 1002
1008 j 1007

Employee ID: TEXTBOX
Employee Name: TEXTBOX

Posted 10-Oct-11 20:11pm
Updated 10-Oct-11 20:31pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

you can use LINQ to query the Entity i.e. the table and/or lambda expressions to fetch the data you want. But my question here is, do you want to retrieve the name as you type the id in the text box or after you have typed the ID and tabbed out or clicked a button? The former is pretty much like using "LIKE" in a SQL query and the latter is like doing an exact search based on an ID. Lambda Expressions can make it extremely easy for you to query the Entity much like a SQL query and then bind the results to the drop down.

Explore a little and hack a lot and I am sure you will find your answer.


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 12 Oct 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100