Even in trying to find an answer to this problem, I haven't found any clear explanation (especially one not discussing GridViews) on how to resolve the following error I receive when running a program with an UpdatePanel:
Message: Control with ID 'lblDisplay' being registered through RegisterAsyncPostBackControl or RegisterPostBackControl must implement either INamingContainer, IPostBackDataHandler, or IPostBackEventHandler.
The UpdatePanel is:
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"></asp:ScriptManager>
<asp:UpdatePanel ID="up1" UpdateMode="Conditional" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lblDisplay" eventname="Load" />
</Triggers>
<ContentTemplate>
<asp:HiddenField ID="hiddenZone" runat="server" />
<asp:HiddenField ID="hiddenZone2" runat="server" />
<div style='width: 150px;position:absolute; margin-left: 0;text-align:center;'>
<span id="clock" style='font-size:125%;'></span>
<asp:Label ID="lblDisplay" runat="server" Text=""></asp:Label></div>
<div style='width:150px;position:absolute;margin-left:150px;text-align:center;text-transform:capitalize;'>
<asp:Label ID="lblDisplay2" runat="server" Text="" Interval="5000" ontick="tick"></asp:Label>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
From my understanding, I have to implement the INamingContainer interface for lblDisplay, but am not quite sure on how to accomplish this. Do I have to databind the UpdatePanel information? Create a new object for INamingContainer?