T
Tonix
This problem was originated by Thanh Nguyen. Your help is appreciated.
Thanks.
The original text is:
Hi everyone, I'm encountering a very weird problem, I have spent the last 3
days trying to figure out how to fix but there is still no clue. Here is the
problem:
I define 2 WebUserControls:
- Content.ascx has a TabStrip control and a Button on it.
- Box.ascx has a PlaceHolder control on it.
In the OnInit() event handler, I create a table cell and dynamically add the
Box.ascx control to the table Cell using LoadControl() method. Then I
dynamically add the Content.ascx control to the PlaceHolder inside the
Box.ascx control.
When the webapp runs, clicking on the Button (in Content.ascx) does raise
the event, clicking on the TabStrip control (also in
Content.ascx) does NOT rise the event.
The weird thing is if I don't use LoadControl() but instead creating a Panel
control and add the Content.ascx to the Panel control then it works fine.
It seems there is something wrong with dynamic control loading & the
PlaceHolder but I'm not sure
Could someone please help? Much appreciated!!!
Thanks
Thanks.
The original text is:
Hi everyone, I'm encountering a very weird problem, I have spent the last 3
days trying to figure out how to fix but there is still no clue. Here is the
problem:
I define 2 WebUserControls:
- Content.ascx has a TabStrip control and a Button on it.
- Box.ascx has a PlaceHolder control on it.
In the OnInit() event handler, I create a table cell and dynamically add the
Box.ascx control to the table Cell using LoadControl() method. Then I
dynamically add the Content.ascx control to the PlaceHolder inside the
Box.ascx control.
When the webapp runs, clicking on the Button (in Content.ascx) does raise
the event, clicking on the TabStrip control (also in
Content.ascx) does NOT rise the event.
The weird thing is if I don't use LoadControl() but instead creating a Panel
control and add the Content.ascx to the Panel control then it works fine.
It seems there is something wrong with dynamic control loading & the
PlaceHolder but I'm not sure
Could someone please help? Much appreciated!!!
Thanks