Multiple controls with the same ID...

  • Thread starter Thread starter Steve Black
  • Start date Start date
S

Steve Black

Hello,

I am dynamically creating a System.Web.UI.WebControls.Table on my web
form, and within my table I put various radiobuttons, textboxes and
dropdownlists. When my table is created the first time, everything
works fine. However, when I post back and the table is re-created, I
am getting the above error. The first thing I do in my creation
routine is clear all existing rows from my table, so I'm not sure why
I'm getting this.

I increment my IDs by 1 each time (ID = "C1", "C2", etc.) and I'm sure
I'm not re-using IDs that have already been used.

Any help would be greatly appreciated.

Thanks,

Steve
 
At what point are you creating these controls? Can you do it inside the
Page's OnInit?
 
Back
Top