Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Patrick 16 posts 36 karma points
    Nov 24, 2009 @ 17:46
    Patrick
    0

    Multiple controls with the same ID were found. Trace requires that controls have unique IDs.

    Hi

    I've added a .net usercontrol as a macro to an existing umbraco ( v 4.0.2.1 ) website. When an error occurs in the code rather than displaying the actual error it displays this one:

    Multiple controls with the same ID 'ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ctl14' were found. Trace requires that controls have unique IDs.

    I can't find that control in the html and I'm not quite sure where to begin finding it as the site was built by someone else.  Is this something that has an obvious cause, if not where do I start trying to debug it?

  • Shaun 248 posts 475 karma points
    Nov 24, 2009 @ 18:47
    Shaun
    0

    The ID  given is the one that .Net generates when it renders the control, I expect the control itself that has been duplicated is called something like

    ContentPlaceHolderDefault. and will be in the ascx file somewhere. I'd start looking there.

    If the control only appears once in the ascx, is it possible that the the macro being called more than once in the template?

     

     

  • Patrick 16 posts 36 karma points
    Dec 04, 2009 @ 18:20
    Patrick
    0

    Hi, thanks for the suggestion.  I tried debugging a different page (using &umbDebugShowTrace=true) that doesn't have my ascx on and it still comes up with the same problem. Is there any way I can get umbraco to give me a hint about what control it's talking about?  I tried looking in view source and there's no sign of ContentPlaceHolderDefault. Here is the stack trace

    [HttpException (0x80004005): Multiple controls with the same ID 'ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ctl14' were found. Trace requires that controls have unique IDs.]
    System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize, Int32 controlStateSize) +426
    System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +344
    System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +426
    System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +426
    System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +426
    System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +426
    System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +426
    System.Web.UI.Page.BuildPageProfileTree(Boolean enableViewState) +39
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5792

     
  • Chad Rosenthal 272 posts 474 karma points
    Dec 08, 2009 @ 18:32
    Chad Rosenthal
    0

    I'm having the same issue. From what I can tell, the issue is due to a Macro being cached. I change the Cache Period on my Macro to 0, and the error goes away. I update it to 60, and voila....the error is back.

  • Patrick 16 posts 36 karma points
    Jan 22, 2010 @ 11:40
    Patrick
    0

    Ah, that makes sense as I don't get that problem if I leave the page for a while before refreshing.  I've finished the project now but I'll try that next time. Thanks.

  • Dan 43 posts 72 karma points
    Oct 16, 2010 @ 01:08
    Dan
    0

    Hi, does anyone have a solution to this apart from not caching the macro?

    I have an xslt macro(navigation) cached in the master page and i'm doing a postback in another macro(.net) and it's complaining about multiple controls.

    I could just not cache it but that seems like a waste.

     

    ta

  • Justin Moore 41 posts 100 karma points
    Apr 23, 2013 @ 17:44
    Justin Moore
    0

    I had a documenttype that had two properties with the same alias that caused this error message

  • Maritza 29 posts 49 karma points
    Dec 10, 2014 @ 13:54
    Maritza
    0

    I need help please I'm getting the same error, when I refresh the node it goes away but 1/2 hour latter it happens again

    Server Error in '/' Application.


    Multiple controls with the same ID 'ctl00$ctl00$ctl00$ctl32' were found. Trace requires that controls have unique IDs.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Multiple controls with the same ID 'ctl00$ctl00$ctl00$ctl32' were found. Trace requires that controls have unique IDs.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [HttpException (0x80004005): Multiple controls with the same ID 'ctl00$ctl00$ctl00$ctl32' were found. Trace requires that controls have unique IDs.]
       System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize, Int32 controlStateSize) +4606498
       System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +431
       System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +515
       System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +515
       System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +515
       System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +515
       System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +515
       System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +515
       System.Web.UI.Page.HandleError(Exception e) +904
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11538454
       System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11537982
       System.Web.UI.Page.ProcessRequest() +269
       System.Web.UI.Page.ProcessRequest(HttpContext context) +167
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +625
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270
    

Please Sign in or register to post replies

Write your reply to:

Draft