Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Add a new row dynamically to a table

Reply
Thread Tools

Add a new row dynamically to a table

 
 
Henke
Guest
Posts: n/a
 
      04-18-2004
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically add row to a table AliR \(VC++ MVP\) ASP .Net 3 08-27-2007 08:19 AM
How to add a row to the table web control dynamically in asp .net 2.0 on a button click retaining the user input in previous rows? loga123 ASP .Net 1 10-03-2006 04:48 AM
row bottom border in inner table not matching up with row border in outer table phl HTML 1 06-08-2006 03:43 PM
dynamically add a table row with onclick cool2005 Javascript 8 05-09-2005 12:46 PM
Add a new row dynamically to a table Henke ASP .Net 1 04-18-2004 06:41 PM



Advertisments