Repeater ClientID Change after DataBind() (BUG?)

I

Iain

A placeholder a repeater and a couple of textboxes walk into a
bar....haha...

No, Seriously, I have a placeholder, a repeater, the repeater
itemtemplate has a textbox in it, and a submit button to tie it all
together. So, in the page_load event I bind to a simple array using:

rep.DataSource = new string[4];
rep.DataBind();

At this stage the textbox clientid's are myRepeater$ctl00$textBox,
myRepeater$ctl01$textBox etc...

So now I move the repeater inside the placeholder using:

myPlaceHolder.Controls.Add(myRepeater);

and the clientid's have changed to: myRepeater$ctl04$textBox,
myRepeater$ctl05$textBox etc.

Any idea why the clientid's have been changed?

Iain
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,079
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top