I have a number of checkbox controls dynamically built on Page_Load. Each checkbox control's ID is programmatically created using a primary key pulled from a database.
The ID for each checkbox control is created like this: checkbox.ID = "CheckboxID" & UserReader("fldPrimaryKey")
At runtime, I want to determine if the checkbox is checked or not. I am able to pull the correct value and assign it to the variable
fldPrimaryKey . This is my code that presently does not work.
If ("CheckboxID" & fldPrimaryKey).checked = True Then
lots of happy code...
End If
My question is 'how do I correct the above code?' or 'is this a stupid way of checking to see if the control is checked?'.
...
Go to the complete details ...