Control ID

Discussion in 'ASP .Net Building Controls' started by Zürcher See, Jan 27, 2005.

  1. Zürcher See

    Zürcher See Guest

    Is it possible to reset the counter of the automatic id generator of the
    ControlCollection?
    When I add a Control to a new ControlCollection it recive the id "ctl1", if
    the ControlCollection is cleared, the automatic counter won't be reset and
    the next added control recive the id "ctl2".
     
    Zürcher See, Jan 27, 2005
    #1
    1. Advertisements

  2. hi,

    any reason as to why u need to reset the counter,
    You can assign an ID to the control at design time.
    Dont implement the inaming container interface to prevent prefixing the
    controls with "ctlxxx".

    regds,
    Kannan.V

    "Zürcher See" wrote:

    > Is it possible to reset the counter of the automatic id generator of the
    > ControlCollection?
    > When I add a Control to a new ControlCollection it recive the id "ctl1", if
    > the ControlCollection is cleared, the automatic counter won't be reset and
    > the next added control recive the id "ctl2".
    >
    >
    >
     
    Kannan.V [MCSD.net], Jan 28, 2005
    #2
    1. Advertisements

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. Replies:
    0
    Views:
    863
  2. Matthew Louden
    Replies:
    1
    Views:
    7,609
    Scott M.
    Oct 11, 2003
  3. Mad Scientist Jr
    Replies:
    0
    Views:
    886
    Mad Scientist Jr
    Mar 22, 2006
  4. shapper
    Replies:
    6
    Views:
    1,206
    shapper
    Dec 26, 2007
  5. Jonathan Wood

    User Control to Control Other User Control

    Jonathan Wood, Jan 24, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    804
    Jonathan Wood
    Feb 2, 2010
  6. Replies:
    1
    Views:
    586
    Teemu Keiski
    Jul 2, 2003
  7. Matt Sokol
    Replies:
    2
    Views:
    618
    Theo Tillotson
    Aug 7, 2003
  8. Rock

    Getting values from control to control to control

    Rock, Oct 19, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    193
Loading...