Who is Participating?
The problem is in the below line

ddl.Items.Add(new ListItem(books(i,0),books(i,1)))  

you have declared the array books(3) which means that its a one dimensional array but you are trying to access it like a two dimensional array by saying books(i,0) you should change it to books(i)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.