P
Patrick
Hello,
I have an ASP page, where I want to add buttons dynamically.
I used C# and a for-loop do to this. The button generating code looks
like this:
Button bt1 = new Button();
bt1.Text = "Download";
bt1.ID = "" + id;
bt1.Click += new EventHandler(download_Click);
Placeholder1.Controls.Add(bt1);
The code worked fine for me until I embedded this page into a
Masterpage.
Now nothing happens when the button is clicked.
The method "download_Click" is never called.
How can I fix this?
BTW I noticed that the client_id and the uniqueID of the button change,
after it is added to the placeholder.
TIA,
Patrick
I have an ASP page, where I want to add buttons dynamically.
I used C# and a for-loop do to this. The button generating code looks
like this:
Button bt1 = new Button();
bt1.Text = "Download";
bt1.ID = "" + id;
bt1.Click += new EventHandler(download_Click);
Placeholder1.Controls.Add(bt1);
The code worked fine for me until I embedded this page into a
Masterpage.
Now nothing happens when the button is clicked.
The method "download_Click" is never called.
How can I fix this?
BTW I noticed that the client_id and the uniqueID of the button change,
after it is added to the placeholder.
TIA,
Patrick