Hello. I need to dynamically generate a series of RadioButtonLists based on information stored in a database. I've got this down. It is retrieving the values that I am struggling with. I assume that the issue is probably the fact that I need to recreate them on each intialization...but I don't know how to do that and was wondering if someone could guide me in the right direction.
Relevant code:
override protected void OnInit(EventArgs e)
{
if (Request.Form.Count > 0)
{
createQuestions();
}
base.OnInit(e);
}
protected System.Web.UI.WebControls.Button button1;
protected void createQuestions()
{
// Now we must generate the controls based on this
for (int i = 0; i < randQuestions.Count; i++)
{
Label temp = new Label();
temp.ID = "tb" + randQuestions[i].ItemArray[0].ToString();
temp.Text = " ...
Go to the complete details ...