I am having an issue with a checkboxlist that is loaded dynamically. I have one list of data that needs to be split out into 2 different sets.
The first set of data is just static text with a dynamically created linkbutton next to it that adds a handler to be called.
For i as Integer = 0 To data.Count - 1
If MyConditionIsMet = True Then
pnlOption1.Controls.Add(New Literal With {.Text = "<p class=""margin-left15"">"})
pnlOption1.Controls.Add(New Literal With {.Text = String.Format("{0} ", item(i).FullName)})
Dim lnkBtnDelete As New LinkButton With {.Text = "Remove", .ToolTip = "Remove", .CommandArgument = data(i).ID.ToString, .ID = "lnkBtnDelete" & i}
AddHandler lnkBtnDelete.Click, AddressOf DeleteItem
pnlOption1.Controls.Add(lnkBtnDelete)
pnlOption1.Controls.Add(New Literal With {.Text = "</p>"})
...
Go to the complete details ...