My issue turned out to be a bit different. The problem was when I am adding a
new control to the page, the designer is automatically removing the event
mappings from initializeComponent(). So I have to add the event maps for all
controls again. Any thoughts on why this happens.
"Elroyskimms" wrote:
> On Oct 4, 3:52 am, Huzefa <Huz...@discussions.microsoft.com> wrote:
> > Hi,
> >
> > I am using a Multipage control with ASP.Net 1.1. The events for controls
> > within the multipage are not getting fired. Any ideas why this would happen.
> > It was working fine before i added another usercontrol to the page.
> >
> > Thanks
>
> Anytime I ran into this problem, it was because I was adding the User
> Controls to the page in the Load event. If you add the User Controls
> in the Load event my experience has shown me that events are not fired
> beyond a couple generations (parent control -> child control -> child
> control -> etc.). So, make sure you add all User Controls in the Init
> event of the page, not Load.
>
> Also, if you are dynamically adding controls in the Init event, you
> need to be sure to add the controls every time the page loads,
> including postbacks. You can't have your User Control being loaded
> inside an If Not Page.IsPostBack block. The controls need to be added
> on Postbacks as well as initial loads.
>
> If those don't help, try posting some sample code and I will try to
> take a closer look.
>
> -E
>
>
|