dynamic button...

R

Richard

I created dynamic button
but only first button can call function checkGenres
what's wrong?


for(int i=0 , i<10,i++)
{
Button btnclick = new Button();
btnclick.Text=iToString();
btnclick.Width = 400;
btnclick.Height = 30;
// btnclick.ID ="btnclick"+i.ToString();
btnclick.Click += new System.EventHandler(this.checkGenres);
Placeholder3.Controls.Add(btnclick);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top