Monday, June 14, 2010

A control with ID 'myControl' could not be found for the trigger in UpdatePanel 'myUpdatePanel'.

I tried creating the trigger programmatically and assigning the control using FindControl, but it didn't work. This worked for me:

Programmatically adding AsyncPostBackTrigger controls is not supported. Find out the control via findcontrol method, then use the RegisterAsyncPostBackControl(Control) method of the ScriptManager control to programmatically register a postback control, and then call the Update() method of the UpdatePanel when the control posts back.

I found this information here.

No comments: