PDA

View Full Version : [CLOSED] DirectMethods and error with dynamic controls



jchau
Dec 01, 2014, 10:43 PM
Ever since upgrading from Ext.NET 2.2 to 2.5, we have been seeing errors like

An error has occurred because a control with id 'ctl00$c$ctl71' 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.

This wasn't an issue before and I can understand where it is coming from. We often create dynamic controls only on initial page load because our pages do not need to do a normal postback. We only use DirectMethods or DirectEvents. Is there a way to tell app not to validate against dynamic controls? I do not need their post data to persist during DirectMethods / DirectEvents.

Note we turn off viewstate on all our pages.

Daniil
Dec 02, 2014, 11:01 PM
Hi @jchau,

Probably, I would also expect such an Exception should not occur at all if ViewState is turned off completely.

I also have no idea why this problem has started to appear after the upgrade to v2.5.

Is the Exception thrown when a custom control runs a DirectMethod, isn't? Though, either you answer yes or no, it would probably lead to another questions from our side. I think our best help might happen if you provide a test case to reproduce. I understand it might be problematic to provide us with a test case.

By the way, were you able to determine what exactly control causes the Exception to be thrown?


Is there a way to tell app not to validate against dynamic controls?

I don't think there is a way. If you find any, I would appreciate if you share.