hey
im doing a project and am having problem getting this code correct could you please have a look at it and help me understand were i am making the mistake
the code
Private Sub m_buttonAddUserRole_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles m_buttonAddUserRole.Click
Dim roleIndex As Integer = ListBox1.SelectedIndex
If (roleIndex = -1) Then
Return
End If
' Get the current user index.
Dim userIndex As Integer = ListBox2.SelectedIndex
' Should we ignore the the event?
If (userIndex = -1) Then
Return
End If
' Get the identifiers.
Dim userID As Integer = CType(ListBox1.Rows(userIndex)("user_id"), Int32)
Dim roleID As Integer = CType(m_roleTable.Rows(roleIndex)("role_id"), Int32)
end sub
the errors says
'Rows' is not a member of 'System.Windows.Forms.ListBox'.
why is this