dynamic button...

Discussion in 'ASP .Net Web Controls' started by Richard, Jul 23, 2004.

  1. Richard

    Richard Guest

    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);
    }
     
    Richard, Jul 23, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick Glos
    Replies:
    0
    Views:
    647
    Rick Glos
    Jul 8, 2003
  2. Chris Thunell
    Replies:
    3
    Views:
    3,430
    Edward
    Jul 21, 2004
  3. =?Utf-8?B?VGVyb3M=?=

    Dynamic Variables? OR Dynamic Controls

    =?Utf-8?B?VGVyb3M=?=, Aug 10, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    423
    Scott Allen
    Aug 10, 2004
  4. Replies:
    5
    Views:
    5,587
  5. Kooki

    Dynamic Table with Dynamic Button inside

    Kooki, Sep 15, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    153
    Kooki
    Sep 15, 2005
Loading...

Share This Page