Multiple controls with the same ID '_ctl0:_187f384120d0' were found!

Discussion in 'ASP .Net' started by Anders Borum, Nov 26, 2003.

  1. Anders Borum

    Anders Borum Guest

    Hello!

    I'm building pages dynamically, by loading usercontrols recursively and
    adding the to eachother. My problem is usercontrols - defined with
    output-caching directives. When these usercontrols area loaded, they're
    returned as PartialCachingControls.

    The UniqueID of the PartialCachingControl is first assigned, when it is
    added to the controls collection of the parent control. This is where I'm
    getting an error.

    My problem: When adding the PartialCachingControl to the controls collection
    of the parent control, ASP.NET somehow doesn't assign the
    PartialCachingControl a unique identifier but re-uses the identifier for
    PREVIOUSLY loaded PartialCachingControls.

    In addition to the error below, I'm experiencing that the SAME cached output
    is displayed for each of the PartialCachingControls in the page (the wrong
    identifier is causing this, I'm sure).

    Error message returned by ASP.NET: "Multiple controls with the same ID
    '_ctl0:_187f384120d0' were found. Trace requires that controls have unique
    IDs."

    __PAGE ASP.index_aspx
    _ctl0 ASP.a_ascx
    _ctl0:_ctl2
    System.Web.UI.ResourceBasedLiteralControl
    _ctl0:BodyArea System.Web.UI.HtmlGenericControl
    _ctl0:_ctl0 System.Web.UI.PartialCachingControl
    _ctl0:_187f384120d0 ASP.test1_ascx
    _ctl0:_187f384120d0:_ctl0 System.Web.UI.Control
    _ctl0:_187f384120d0:_ctl1 System.Web.UI.LiteralControl
    _ctl0:_ctl1 <- FAILS HERE

    Have any of you been trying to do the same behaviour (and come across the
    same error)? Any light is very welcome - answer the question and get a car
    (well, almost =o))

    Thanks in advance.

    --
    venlig hilsen / with regards
    anders borum
    --
     
    Anders Borum, Nov 26, 2003
    #1
    1. Advertising

  2. Anders Borum

    Anders Borum Guest

    Potential bug in ASP.NET (latest .net framework)

    Hello!

    This thread actually shows, that I've come across a potential bug in
    ASP.NET. Let's hope Microsoft is aware of this, because it's a very annoying
    issue.

    http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=125051

    Let's hear what you say - come on! =o)

    --
    venlig hilsen / with regards
    anders borum
    --
     
    Anders Borum, Nov 26, 2003
    #2
    1. Advertising

  3. Anders Borum

    Anders Borum Guest

    Anders Borum, Nov 26, 2003
    #3
    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. Jeff Tolman
    Replies:
    0
    Views:
    2,986
    Jeff Tolman
    Nov 4, 2003
  2. Tarren
    Replies:
    0
    Views:
    343
    Tarren
    Jan 14, 2005
  3. Steve Steve

    _ctl5:_ctl0:p1456 in webform textbox

    Steve Steve, Feb 18, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    159
    Alessandro Zifiglio
    Feb 19, 2004
  4. DFB

    Automatic Control Prefixes like _ctl0

    DFB, Sep 21, 2005, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    200
  5. vibs
    Replies:
    5
    Views:
    609
    Keith Patrick
    Jan 21, 2006
Loading...

Share This Page