For I = 0 To DT.Rows.Count - 1 Dim TR As New TableRow If I Mod 2 <> 0 Then TR.BackColor = Color.Gray TR.ForeColor = Color.White Else TR.BackColor = Color.White TR.ForeColor = Color.Black End If TC = New TableCell TC.HorizontalAlign = HorizontalAlign.Center Dim b As New Button b.Text = "اجابة" b.Width = 40 b.ID = DT.Rows(I).Item("ID") AddHandler b.Click, AddressOf DynButton_Click TC.Controls.Add(b) TC.Width = 40 TR.Cells.Add(TC) Next
Private Sub DynButton_Click(ByVal sender As Object, ByVal e As EventArgs) MsgBox(b.ID) End Sub
sender
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)