Multiple controls with the same ID

S

shiretu

Hi,

I'm trying to make a WebPropertyGrid control in ASP.NET. The control
renders itself as expected when the request is a "GET". When I make a
POST, I get the following error:

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

The architecture of my control is quite simple: using reflection I read
the properties from an object and generate appropriate web controls for
the user. For basic types like int,long,string,DateTime, etc I make an
TextBox. For complex types (those who are not in the list before) I
recursively make another WebPropertyGrid. My WebPropertyGrid structure
is initialized in CreateChildControls overridden method. After that I
call the base method. The CreateChildControls method works fine even
when I receive the error message into the browser. I suspect the
problem is in the rendering part....


ANY input is greatly appreciated
 
S

shiretu

Additional info on the subject....


I implement INamingContainer and the control used for rendering
DateTime type is an custom control who also implements
INamingContainer.
Every id in the HTML output is ok. There are no duplicates......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top