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

3 posts, 0 answers
  1. RichJ
    RichJ avatar
    83 posts
    Member since:
    Aug 2006

    Posted 31 Jul 2013 Link to this post

    Hi all,

    I'm hoping someone out there may be able to help with this issue I'm having.

    Scenario:
    I have a page containing a radsplitter which is divided into 3 main panes: Across the top, down the left-hand side and the third is the main content panel.

    Within the left-hand pane I have nested splitters and a panelbar, using templated panels that contain ajaxified radgrids (using advanced binding).  In the main content pane I have a tabstrip and multipage.

    No controls are being added dynamically/programmatically, other than tabs being added using client-side scripts from within the main content pane.

    Now the problem:
    If I do not open any tabs everything works great - the grids page nicely and everyone is happy.
    If, however, I open a tab, after 3-4 paging operations on the grids I get the dreaded Multiple controls with the same ID were found. FindControl requires that controls have unique IDs.

    Now I *know* there are no controls being added between the ajax paging postbacks.  And the error only occurs after 3-4 actions taking place on the grid as opposed to immediately.  Disabling ajax I still continue to get the error.
    I have no RadAjaxPanels anywhere - everything is hooked up using the RadAjaxManager.
    If I remove the grid outside of all the radsplitter/panelbar elements the problem persists.
    I have gone through all my code and made absolutely certain that every control has a unique ID (radcodeblocks, pageviews etc).
    There are no pageLoad() or document.ready functions being used.

    I'm completely stumped.  the stack trace shows that the problem occurs after the tabstrip PreRender process:
    [HttpException (0x80004005): Multiple controls with the same ID 'ctl01' were found. FindControl requires that controls have unique IDs.]
       System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +12651760
       System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
       System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
       System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
       System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
       System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
       System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
       System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +320
       Telerik.Web.UI.RadTabStrip.OnPreRender(EventArgs e) +103

    I've reviewed this post http://www.telerik.com/help/aspnet-ajax/ajax-content-type.html but it's not applicable because I'm not dyanmically adding controls.  I've also tried the javscript from this post http://www.telerik.com/help/aspnet-ajax/tabstrip-faq.html but still the problem persists.

    Can anyone offer any suggestions about where I should should look next?

    Help!

    Rich
  2. RichJ
    RichJ avatar
    83 posts
    Member since:
    Aug 2006

    Posted 31 Jul 2013 Link to this post

    Forgot to mention: I'm using the latest build of the controls 2013.2.717.40
    and I'm not calling any explicit FindControl functions.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 05 Aug 2013 Link to this post

    Hello Rich,

    Since the problem is reproducible outside the RadSplitter environment maybe it lies somewhere in the grid configuration. However in order to provide a precise answer I would like to ask you to show us the markup and code-behind of the grid. Without having a better understanding of the implementation it would be hard to determine the root cause of the issue.

    Regards,
    Angel Petrov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top