Dec 13, 2013, 9:21 AM
So I stepped through the code and the IDMode is correct when the controls are in UserControlScriptBuilder.Build() when it loads uc, but they change to IDMode.Static when it retrieves childControls = this.FindControls() in DefaultScriptBuilder.Build(). Inside FindControls() it calls Control.EnsureChildControls() which is causing the loss of IDMode. This calls LifeCycle.CreateClientControls. IDMode changes immediately after this:
this.Controls.Add(((IContent)this).ContentContaine r). this, in this case is the ContentContainer and it was explicitly set to IDMode.Static at the top in UserControlScriptBuilder.Build() [why I do not know). I'm wondering if the IDMode is cascading to the children, but I cannot step through further. At this point I'm hoping this can clue you in on the issue.
this.Controls.Add(((IContent)this).ContentContaine r). this, in this case is the ContentContainer and it was explicitly set to IDMode.Static at the top in UserControlScriptBuilder.Build() [why I do not know). I'm wondering if the IDMode is cascading to the children, but I cannot step through further. At this point I'm hoping this can clue you in on the issue.
Last edited by michaeld; Dec 13, 2013 at 9:38 AM.