문제

I am creating some controls in a table runtime and adding them to List(Of T) for using them in future. Now I want to change the backcolor of the table's column which contains ImageList(x). Here ImageList() is a list of Images. But when I try to change the backcolor of the table's column i.e. parent of imagelist(x) it says backcolor is not a member of system.web.ui.control.

Here is the code

For x As Integer = 0 To FileImageList.Count - 1
            If sender.id.substring(3) = FileImageList(x).ID.Substring(3) Then
                FileNameList(x).Parent.backcolor = Drawing.Color.Green
            End If
        Next

What might be the problem? Does anybody know?

도움이 되었습니까?

해결책

I changed the type of Imagelist() to Object and it works fine. No errors.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top