Lifecycle C1Dialog. MasterPage, UserControl ascx using C1Dialog 2025v2 399

Posted by: enrique.pv-ext on 12 June 2026, 3:40 am EST

  • 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 ?

  • Posted 12 June 2026, 7:33 am EST

    Hello Enrique,

    Could you please share a small sample application that reproduces the issue?

    From the information provided, it is difficult to determine whether this is due to a lifecycle change in C1Dialog, the way the UserControl is being loaded, or another application-specific factor.

    In particular, it would be helpful to review:

    • The MasterPage implementation
    • The UserControl containing the C1Dialog
    • The code where lblMessage is accessed during postback
    • The exact event in which the control is found to be null

    Once we can reproduce the behavior, we will investigate further and clarify the expected lifecycle of C1Dialog and its content template.

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels