fetch listbox with values vb .net
-
Dear everyone. hope you all will be fine and good in health. i have a problem that i want to fetch a listbox with names. please help me that what code i have to write. PICTURE IS HERE; i have a table STUDENT with attributes (ID, Name, Age) i have inserted 100 students record into STUDENT tabl i have a listbox control named lstStdents on my form now i want that when my form is opened, it should auotmatically fill the listbox with NAME of students i want to know that how to fill that box using datareader? thanks
-
Dear everyone. hope you all will be fine and good in health. i have a problem that i want to fetch a listbox with names. please help me that what code i have to write. PICTURE IS HERE; i have a table STUDENT with attributes (ID, Name, Age) i have inserted 100 students record into STUDENT tabl i have a listbox control named lstStdents on my form now i want that when my form is opened, it should auotmatically fill the listbox with NAME of students i want to know that how to fill that box using datareader? thanks
While (dr.Read) lstStdents .Items.Add(dr.Item("Name")) End While Panchal Hardik