Oct 17, 2011, 3:29 PM
Dynamically adding Controls to WebUserControl
Hello,
I created a Web User Control (called 'CTL_Worklist'), in which I statically add an ext:Panel.
No I try to add a LinkButton to the content of that ext:Panel.
I call Panel.UpdateContent() and the LinkButton is corrctly displayed in the Panel.
I also added a DirectEvent with a Url to another aspx site to the LinkButton.
So far so good.
But now I try to click on that LinkButton (called 'Btn1') and I get the following strange Error:
'The control with ID 'CTL_Worklist_Btn1' not found'
The stacktrace is:
Am I missing something or what am I doing wrong here?
Thanks a lot for your help!
regards,
bright
I created a Web User Control (called 'CTL_Worklist'), in which I statically add an ext:Panel.
No I try to add a LinkButton to the content of that ext:Panel.
I call Panel.UpdateContent() and the LinkButton is corrctly displayed in the Panel.
I also added a DirectEvent with a Url to another aspx site to the LinkButton.
So far so good.
But now I try to click on that LinkButton (called 'Btn1') and I get the following strange Error:
'The control with ID 'CTL_Worklist_Btn1' not found'
The stacktrace is:
[HttpException (0x80004005): The control with ID 'CTL_Worklist_Btn1' not found]
Ext.Net.ResourceManager.RaisePostBackEvent(String eventArgument) +2102
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
Am I missing something or what am I doing wrong here?
Thanks a lot for your help!
regards,
bright
Last edited by geoffrey.mcgill; Oct 17, 2011 at 3:34 PM.
Reason: please use [CODE] tags