Repeater ClientID Change after DataBind() (BUG?)

Discussion in 'ASP .Net' started by Iain, Sep 1, 2006.

  1. Iain

    Iain Guest

    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
     
    Iain, Sep 1, 2006
    #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. Maras
    Replies:
    1
    Views:
    3,186
    Cowboy \(Gregory A. Beamer\)
    Oct 15, 2003
  2. Vincent Mouton

    ClientID in Repeater gives the Control ID

    Vincent Mouton, Oct 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    6,275
    Vincent Mouton
    Oct 23, 2004
  3. Colin Nicholls

    Problem: Nested Repeater won't databind()?

    Colin Nicholls, Jan 12, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    5,417
    codelavie
    Nov 9, 2009
  4. Stoyan Stratev
    Replies:
    7
    Views:
    4,881
    Lars-Erik Aabech
    Jul 6, 2005
  5. Michael
    Replies:
    0
    Views:
    244
    Michael
    Dec 29, 2003
Loading...

Share This Page