Hello,
I'm a student, who has to make a c# application, i'm not going to describe it here, just the problem that i'm facing at the moment.What I'm trying to do, is generate a list of buttons, where each button allows me to remove a specific element from an ArrayList. Problem is, with my current approach, it doesn't seem to work. Well, it works, but for some reason, i have to click a button twice in order for the program to work properly. I can't seem to find the problem... So I turn to you people, experienced programmers, in hopes someone can put me on the right trail :)Here's my code:[Code]
using System;
using
namespace
{
list.Add(
Session[
}
list = (
generateButtons();
temp = temp + list[x].ToString();
lblTest.Text = temp;
myButtons[i] =
myButtons[i].Text = list[i].ToString() + i.ToString();
myButtons[i].Click +=
form1.Controls.Add(myButtons[i]);
element = e;