I'm working on an assignment that takes in 20 answers from user using 20 textboxes, grade the answers and output the correct answer choices to 20 label boxes. The input answers and the answer keys are store in array. What's the best method to pass values from the answer key array to all appropriate labels in the form? Right now I'm using this method:
For i As Integer = 21 To intLblNum
For intCount = 0 To (strAnswers.Length() - 1)
gradeResult.Controls("Label" & i.ToString).Text = strAnswers(intCount)
Next
Next
But as the result, all of my label boxes contain only the last element from the answer key array. What'd I do wrong?
intLblNumthe moment the first loop is entered?