Link to home
Start Free TrialLog in
Avatar of siva_iaf
siva_iaf

asked on

datareader to ilist

hi i want to know how to loop thru the values of datareader(which is list of values to populate dropdownlist)and add it to the ilist.ilist will be assigned to the datasource of the dropdownlist.
Avatar of Alpesh Patel
Alpesh Patel
Flag of United States of America image

Dim dr as DataReader
'assign reader to dr here

While dr.Read()
'reading from the datareader
'displaying the data to List control
End While


here is the complete example if you need
http://www.startvbdotnet.com/ado/sqlserver.aspx
http://www.vbdotnetforums.com/ado-net/3117-how-use-datareader.html
Avatar of siva_iaf
siva_iaf

ASKER

hi thanks. im aware of this but  actually what i need is
dim ilistitems as ilist
while dr.read()
ilistitems.add(dr(//i want to know the code that is written here))

end while
(ilistitems now shld have all the values of datareader)
return ilistitems
ASKER CERTIFIED SOLUTION
Avatar of Alpesh Patel
Alpesh Patel
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial