Velocity Reviews - Computer Hardware Reviews

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

Thread Tools

Add a new row dynamically to a table

Posts: n/a

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:


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


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

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 ?


// Henke

Reply With Quote

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