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. Advertisements

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. Chris Thunell
    Replies:
    3
    Views:
    3,599
    Edward
    Jul 21, 2004
  2. =?Utf-8?B?VGVyb3M=?=

    Dynamic Variables? OR Dynamic Controls

    =?Utf-8?B?VGVyb3M=?=, Aug 10, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    572
    Scott Allen
    Aug 10, 2004
  3. Replies:
    5
    Views:
    5,786
  4. =?Utf-8?B?QkxpVFpXaU5H?=

    Adding dynamic LinkButton to dynamic table

    =?Utf-8?B?QkxpVFpXaU5H?=, Jul 27, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    870
    =?Utf-8?B?QkxpVFpXaU5H?=
    Jul 27, 2005
  5. Ronald
    Replies:
    2
    Views:
    1,046
    Robbe Morris [C# MVP]
    Jan 17, 2006
  6. arthernan
    Replies:
    0
    Views:
    1,625
    arthernan
    Mar 10, 2006
  7. Replies:
    0
    Views:
    6,185
  8. Kooki

    Dynamic Table with Dynamic Button inside

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