Posted 12 June 2026, 3:40 am EST
Hi,
Migrate from 2010v1 to 2025v2 399 in ASP.NET WebForms NET Framework 4.8.1.
Migrate C1Window to C1Dialog.
Using C1Dialog from C1.Web.Wijmo.Controls.48.dll
UserControl ascx using C1Dialog
<cc2:C1Dialog ID="C1Window1" runat="server" Height="250px" Width="500px"
Title="Notification Dialog"
Resizable="False"
ShowOnLoad="False"
>
<Content>
<asp:Label ID="lblMessage" runat="server" CssClass="minititle"></asp:Label>
NOw, I get error: lblMessage is null in any Postback in my pages aspx.
My aspx use a MasterPage.
MasterPage use a custom UserControl ascx.
My custom UserControl ascx use a C1Dialog control (name C1Window1 , was legacy).
C1Window vs C1Dialog: lifecycle changed ?
C1Dialog In Wijmo 2025v2, C1Dialog instantiates its template differently (during CreateChildControls()/rendering phase),
which happens after the PostBack event handlers fire. This is why C1Window1.Title works fine (it’s a direct child of the UserControl), but lblMessage—inside the C1Dialog template—is still null when accessed by show().
ViewState solution ??
The solution is to use ViewState as the authoritative store for Message and synchronize it to the control on OnPreRender, where all controls are guaranteed.
Key to the problem: C1Window1.Title works because C1Window1 is a direct child of the UserControl.
lblMessage, btnAccept, etc., reside within the template of C1Dialog, which Wijmo 2025v2 instantiates deferred. The ViewState acts as a bridge between the event handler (where the control is still null) and the PreRender (where it is already available).
any suggestions about real lifecycle C1Dialog , and about Content template rendering-instantiates ?
