Error: control with id ... could not be located or a different control is assigned to the same ID after postback

Our application has the intermittent (not too often,but can be 10-20 per day) errors like the following:
An error has occurred because a control with id 'grdComplaints$ctl04$ctl00' could not be located or a different control is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error.
 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +877
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I've tried advice from http://p2p.wrox.com/TopicIndex/45979.htm  -
  "EnableViewState Property was set to 'False' when i change it to 'True' it becomes functional."
but it didn't eliminate errors.
Not sure, how to make the problem reproducible. I have some suspicion that it is relatted to An error "An entry with the same key already exists" when assigning ImageButton.ImageUrl

posted @ Monday, May 05, 2008 11:15 PM

Print

Comments on this entry:

# re: Error: control with id ... could not be located or a different control is assigned to the same ID after postback

Left by Bhavana Chaturvedi at 6/22/2008 5:10 PM
Gravatar
Hi

I also facing the same problem.

"EnableViewState Property of grid is by default 'TRUE' when i change it to 'FALSE' it becomes functional."
but my other functionality does'nt work.
Can you give me some idea.

Thanks
Bhavana

# re: Error: control with id ... could not be located or a different control is assigned to the same ID after postback

Left by Michael Freidgeim at 6/29/2008 10:47 PM
Gravatar
In my application it is intermittent error, that I can see in production event log only, but can't reproduce in development/test environment. So still no ideas, what causes it.

# re: Error: control with id ... could not be located or a different control is assigned to the same ID after postback

Left by Michael Freidgeim at 6/29/2008 10:58 PM
Gravatar
Bhavana Chaturvedi,
If you are using dynamic controls, I strongly recommend to read a great atricle: TRULY Understanding Dynamic Controls -Parts 1-4(http://weblogs.asp.net/infinitiesloop/archive/2006/08/25/TRULY-Understanding-Dynamic-Controls-_2800_Part-1_2900_.aspx) and avoid to use them if possible.

Your comment:



 (will not be displayed)


 
 
 
Please add 2 and 2 and type the answer here:
 

Live Comment Preview:

 
«August»
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456