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. Advertising

  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. 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. Replies:
    0
    Views:
    731
  2. Matthew Louden
    Replies:
    1
    Views:
    7,002
    Scott M.
    Oct 11, 2003
  3. Mad Scientist Jr
    Replies:
    0
    Views:
    659
    Mad Scientist Jr
    Mar 22, 2006
  4. shapper
    Replies:
    6
    Views:
    966
    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:
    566
    Jonathan Wood
    Feb 2, 2010
Loading...

Share This Page