H
Helmut
I have I think rather small Problem, if somebody out there could help
me please???
private void AddButton_Click(object sender, System.EventArgs e)
{
TextBox txt = new TextBox();
txt.Width = 200;
txt.Height = 25;
txt.ID = "txt" + Panel1.Controls.Count;
txt.Text = txt.ID;
Button aBtn = new Button();
aBtn.Width = 25;
aBtn.Height = 25;
aBtn.ID = "aBtn" + Panel1.Controls.Count;
aBtn.Text = "[+]";
aBtn.Click += new EventHandler(AddButton_Click);
Button rBtn = new Button();
rBtn.Width = 25;
rBtn.Height = 25;
rBtn.ID = "rBtn" + Panel1.Controls.Count;
rBtn.Text = "[-]";
rBtn.Click += new EventHandler(RemoveButton_Click);
Panel1.Controls.Add(txt);
Panel1.Controls.Add(aBtn);
Panel1.Controls.Add(rBtn);
}
But ny Problem is that
the newly added row does not recognize button click events. And i
will get crazy when i dont find the solution soon!!!!!!
10000 THANKs in Advanced
me please???
private void AddButton_Click(object sender, System.EventArgs e)
{
TextBox txt = new TextBox();
txt.Width = 200;
txt.Height = 25;
txt.ID = "txt" + Panel1.Controls.Count;
txt.Text = txt.ID;
Button aBtn = new Button();
aBtn.Width = 25;
aBtn.Height = 25;
aBtn.ID = "aBtn" + Panel1.Controls.Count;
aBtn.Text = "[+]";
aBtn.Click += new EventHandler(AddButton_Click);
Button rBtn = new Button();
rBtn.Width = 25;
rBtn.Height = 25;
rBtn.ID = "rBtn" + Panel1.Controls.Count;
rBtn.Text = "[-]";
rBtn.Click += new EventHandler(RemoveButton_Click);
Panel1.Controls.Add(txt);
Panel1.Controls.Add(aBtn);
Panel1.Controls.Add(rBtn);
}
But ny Problem is that
the newly added row does not recognize button click events. And i
will get crazy when i dont find the solution soon!!!!!!
10000 THANKs in Advanced