dataset into arraylist and qn on selectionlist

buggie

New member
Joined
Sep 2, 2005
Messages
3
Programming Experience
1-3
Hi.

Q1
Would like to ask if anyone knows how to add ALL the records from a dataset into an arraylist? previously i had retrieved the records and store them inside a dataset. now i just want to know how to add them into an arraylist.


Q2
i would also like to know if anyone knows how to set the selectionlist of asp.net mobile application to a certain value. lets say u want it to display "abc" as a selectedvalue when u go to that page.

it works for asp.net webforms but it cant work in asp.net mobile forms. i kept getting "object not reference..." error.

FYI, for asp.net webforms i just use a single code like this:

dropdownlist1.selectedvalue = "abc"

but i dont know how to do it with mobile selectionlist(in ddl format too).


hope anyone here can answer both my questions, thanks in advance! =D
 
Q1: You'd just loop through the datarows and add each item to the arraylist. If your not using the dataset you could just load the data straight into the arraylist using a datareader (which would be a lot faster).

Q2: If dropdownlist1.selectedvalue = "abc" doesn't work I've got no idea (sorry not done a lot of mobile apps). You may not be able to do in since AFAIK mobile apps don't support JS...
 
Back
Top