S
Sam
Hi,
I'm developing an Ajax enabled Web Site and I've created a Web User Control
(wuc.ascx) with a Button control inside.
There is an main.aspx web page that contains these objects:
- Script Manager
- UpdatePanel2
- Modal Popup Extender
- wuc.ascx user control
wuc.ascx is inside to UpdatePanel2
UpdatePanel2 is inside to the panel of Modal Popup Extender.
I would like to refresh (postback) main.aspx page by clicking the button
inside wuc.ascx (when modal popup is running).
To do this i tried to write this code on Load of main.aspx:
PostBackTrigger pstTrigger=new PostBackTrigger();
//I wrote a property to get button ojbect from user control.
pstTrigger.ControlID = wuc1.button.UniqueID;
UpdatePanel2.Triggers.Add(pstTrigger);
When i try to run web site this error occours:
A control with ID 'ctl00$ContentPlaceHolder1$settimana1$button' could not be
found for the trigger in UpdatePanel 'UpdatePanel2'.
If I add a AsyncPostBackTrigger it works (but the behavour is not the same
and this is not what I want)
Please help me.
Thanks
I'm developing an Ajax enabled Web Site and I've created a Web User Control
(wuc.ascx) with a Button control inside.
There is an main.aspx web page that contains these objects:
- Script Manager
- UpdatePanel2
- Modal Popup Extender
- wuc.ascx user control
wuc.ascx is inside to UpdatePanel2
UpdatePanel2 is inside to the panel of Modal Popup Extender.
I would like to refresh (postback) main.aspx page by clicking the button
inside wuc.ascx (when modal popup is running).
To do this i tried to write this code on Load of main.aspx:
PostBackTrigger pstTrigger=new PostBackTrigger();
//I wrote a property to get button ojbect from user control.
pstTrigger.ControlID = wuc1.button.UniqueID;
UpdatePanel2.Triggers.Add(pstTrigger);
When i try to run web site this error occours:
A control with ID 'ctl00$ContentPlaceHolder1$settimana1$button' could not be
found for the trigger in UpdatePanel 'UpdatePanel2'.
If I add a AsyncPostBackTrigger it works (but the behavour is not the same
and this is not what I want)
Please help me.
Thanks