I have a button which when clicked I want to add a user control to a div;
int count = 0;
protected void AddSectionButton_Click(object sender, EventArgs e)
WorkoutSection newSection = (WorkoutSection)LoadControl("~/usercontrols/WorkoutSection.ascx");
//add the section to the workout and pass to the usercontrol;
count += 1;
newSection.sectionName = "NEW SECTION TEST " + count;
The code work fine fo rthe first click bu tthen doesn't add subsequent instances after I have clicked? any ideas what I am doing wrong here?