Creating new Buttons + Eventhandler via for statement

Discussion in 'ASP .Net Web Controls' started by Asp-Trainee, Aug 20, 2004.

  1. Asp-Trainee

    Asp-Trainee Guest

    Can somebody show me the right way??? PLEASE

    I have following problem:

    for (int i; i < x; i++)
    {
    ImageButton myImageButton = new ImageButton();
    myImageButton.Click+=newSystem.Web.UI.ImageClickEventHandler(this.myImageButton_Click);
    }
    But this do not work!!

    Without a for statement, it is no problem, but in the for statement it
    won´t work

    thanks a lot in advance

    and greetings from innsbruck
    Asp-Trainee, Aug 20, 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. Jacob

    Dynamic eventhandler

    Jacob, Feb 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,608
    Eugene Jenihov
    Feb 5, 2004
  2. =?Utf-8?B?QWxlc3NhbmRybyBSb3NzaQ==?=

    Add an eventhandler on a button_click

    =?Utf-8?B?QWxlc3NhbmRybyBSb3NzaQ==?=, Feb 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    458
    Chris Jackson
    Feb 17, 2004
  3. =?Utf-8?B?SiBNY0Q=?=

    EventHandler problem

    =?Utf-8?B?SiBNY0Q=?=, Feb 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    331
    =?Utf-8?B?SiBNY0Q=?=
    Feb 22, 2004
  4. Neven Klofutar

    Adding a eventhandler to control

    Neven Klofutar, Jun 1, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    310
    Neven Klofutar
    Jun 1, 2004
  5. Anthony Williams

    Help: btnEdit.click += new EventHandler(...) not firing!

    Anthony Williams, Feb 4, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    329
    Anthony Williams
    Feb 4, 2005
Loading...

Share This Page