Add a new row dynamically to a table

Discussion in 'ASP .Net' started by Henke, Apr 18, 2004.

  1. Henke

    Henke Guest

    Hello,

    I have created a dynamic webcontrol table with several rows. I also have a
    ImageButton which
    adds a new row to the table. After I have added a new row, and I click the
    ImageButton again
    I get: "Multiple controls with id '_ctl0' was found ..."

    This is what I have done:

    page_init:

    Check if the table is persisted in a Session variable, if it is then
    add it to a placeholder control.

    page_load:

    If not postback then get the data and render the table and save it
    to a Session variable. The Session variable is used in the page_init method
    to re-create the dynamic table

    I always initialize the imagebutton and adds the eventhandler for the
    ImageBtton_onClick.

    The error message appers after the page_init method has executed.

    I donĀ“t set any ID on the controls in the cells or rows. I let ASP.NET
    handle that for me.

    Can someone give me any pointers or hints what might be wrong ?

    Regards,

    // Henke
     
    Henke, Apr 18, 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. Henke
    Replies:
    1
    Views:
    485
  2. =?Utf-8?B?U3VyZXNo?=
    Replies:
    1
    Views:
    469
    Saravana
    Nov 22, 2004
  3. loga123
    Replies:
    1
    Views:
    4,537
    ort11
    Oct 3, 2006
  4. phl
    Replies:
    1
    Views:
    4,356
    Martin Jay
    Jun 8, 2006
  5. Paul
    Replies:
    1
    Views:
    2,285
    Hermit Dave
    Jul 11, 2008
Loading...

Share This Page