This is a migrated thread and some comments may be shown as answers.

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

2 Answers 628 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
RichJ
Top achievements
Rank 1
RichJ asked on 31 Jul 2013, 07:37 PM
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 Answers, 1 is accepted

Sort by
0
RichJ
Top achievements
Rank 1
answered on 31 Jul 2013, 07:43 PM
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.
0
Angel Petrov
Telerik team
answered on 05 Aug 2013, 11:43 AM
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.
Tags
Ajax
Asked by
RichJ
Top achievements
Rank 1
Answers by
RichJ
Top achievements
Rank 1
Angel Petrov
Telerik team
Share this question
or