paddu v

paddu v

  • 2k
  • 53
  • 46.7k

How to Get the selected Item id in list box using Linq Query

Jul 17 2012 6:25 AM
 var names = from s in dbc.Patient_Detail_Tables where s.Name.Contains(txtSearch.Text) select s;

            listBox1.DataSource = names;
            listBox1.DisplayMember = "Name";
            listBox1.ValueMember = "RegitrationNo";


How to get the valuemember using Linq query?





Answers (4)